var pw=Object.defineProperty;var mp=n=>{throw TypeError(n)};var mw=(n,t,s)=>t in n?pw(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var je=(n,t,s)=>mw(n,typeof t!="symbol"?t+"":t,s),Vu=(n,t,s)=>t.has(n)||mp("Cannot "+s);var R=(n,t,s)=>(Vu(n,t,"read from private field"),s?s.call(n):t.get(n)),pe=(n,t,s)=>t.has(n)?mp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,s),ee=(n,t,s,o)=>(Vu(n,t,"write to private field"),o?o.call(n,s):t.set(n,s),s),Ne=(n,t,s)=>(Vu(n,t,"access private method"),s);var Ea=(n,t,s,o)=>({set _(a){ee(n,t,a,s)},get _(){return R(n,t,o)}});function yw(n,t){for(var s=0;so[a]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))o(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function s(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(a){if(a.ep)return;a.ep=!0;const u=s(a);fetch(a.href,u)}})();function Kc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Hu={exports:{}},zo={},qu={exports:{}},Ce={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var yp;function gw(){if(yp)return Ce;yp=1;var n=Symbol.for("react.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),w=Symbol.iterator;function _(P){return P===null||typeof P!="object"?null:(P=w&&P[w]||P["@@iterator"],typeof P=="function"?P:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,k={};function x(P,U,ce){this.props=P,this.context=U,this.refs=k,this.updater=ce||L}x.prototype.isReactComponent={},x.prototype.setState=function(P,U){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,U,"setState")},x.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function b(){}b.prototype=x.prototype;function j(P,U,ce){this.props=P,this.context=U,this.refs=k,this.updater=ce||L}var T=j.prototype=new b;T.constructor=j,M(T,x.prototype),T.isPureReactComponent=!0;var A=Array.isArray,$=Object.prototype.hasOwnProperty,W={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function B(P,U,ce){var me,he={},X=null,ve=null;if(U!=null)for(me in U.ref!==void 0&&(ve=U.ref),U.key!==void 0&&(X=""+U.key),U)$.call(U,me)&&!G.hasOwnProperty(me)&&(he[me]=U[me]);var Re=arguments.length-2;if(Re===1)he.children=ce;else if(1>>1,U=K[P];if(0>>1;Pa(he,F))Xa(ve,he)?(K[P]=ve,K[X]=F,P=X):(K[P]=he,K[me]=F,P=me);else if(Xa(ve,F))K[P]=ve,K[X]=F,P=X;else break e}}return ae}function a(K,ae){var F=K.sortIndex-ae.sortIndex;return F!==0?F:K.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var p=[],m=[],v=1,w=null,_=3,L=!1,M=!1,k=!1,x=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(K){for(var ae=s(m);ae!==null;){if(ae.callback===null)o(m);else if(ae.startTime<=K)o(m),ae.sortIndex=ae.expirationTime,t(p,ae);else break;ae=s(m)}}function A(K){if(k=!1,T(K),!M)if(s(p)!==null)M=!0,be($);else{var ae=s(m);ae!==null&&_e(A,ae.startTime-K)}}function $(K,ae){M=!1,k&&(k=!1,b(B),B=-1),L=!0;var F=_;try{for(T(ae),w=s(p);w!==null&&(!(w.expirationTime>ae)||K&&!Se());){var P=w.callback;if(typeof P=="function"){w.callback=null,_=w.priorityLevel;var U=P(w.expirationTime<=ae);ae=n.unstable_now(),typeof U=="function"?w.callback=U:w===s(p)&&o(p),T(ae)}else o(p);w=s(p)}if(w!==null)var ce=!0;else{var me=s(m);me!==null&&_e(A,me.startTime-ae),ce=!1}return ce}finally{w=null,_=F,L=!1}}var W=!1,G=null,B=-1,ie=5,ue=-1;function Se(){return!(n.unstable_now()-ueK||125P?(K.sortIndex=F,t(m,K),s(p)===null&&K===s(m)&&(k?(b(B),B=-1):k=!0,_e(A,F-P))):(K.sortIndex=U,t(p,K),M||L||(M=!0,be($))),K},n.unstable_shouldYield=Se,n.unstable_wrapCallback=function(K){var ae=_;return function(){var F=_;_=ae;try{return K.apply(this,arguments)}finally{_=F}}}})(Gu)),Gu}var Sp;function Sw(){return Sp||(Sp=1,Ku.exports=xw()),Ku.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var bp;function bw(){if(bp)return Pt;bp=1;var n=Gc(),t=Sw();function s(e){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},w={};function _(e){return p.call(w,e)?!0:p.call(v,e)?!1:m.test(e)?w[e]=!0:(v[e]=!0,!1)}function L(e,r,i,l){if(i!==null&&i.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return l?!1:i!==null?!i.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function M(e,r,i,l){if(r===null||typeof r>"u"||L(e,r,i,l))return!0;if(l)return!1;if(i!==null)switch(i.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function k(e,r,i,l,c,f,g){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=l,this.attributeNamespace=c,this.mustUseProperty=i,this.propertyName=e,this.type=r,this.sanitizeURL=f,this.removeEmptyString=g}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){x[e]=new k(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var r=e[0];x[r]=new k(r,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){x[e]=new k(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){x[e]=new k(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){x[e]=new k(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){x[e]=new k(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){x[e]=new k(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){x[e]=new k(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){x[e]=new k(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function j(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var r=e.replace(b,j);x[r]=new k(r,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var r=e.replace(b,j);x[r]=new k(r,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var r=e.replace(b,j);x[r]=new k(r,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){x[e]=new k(e,1,!1,e.toLowerCase(),null,!1,!1)}),x.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){x[e]=new k(e,1,!1,e.toLowerCase(),null,!0,!0)});function T(e,r,i,l){var c=x.hasOwnProperty(r)?x[r]:null;(c!==null?c.type!==0:l||!(2S||c[g]!==f[S]){var C=` `+c[g].replace(" at new "," at ");return e.displayName&&C.includes("")&&(C=C.replace("",e.displayName)),C}while(1<=g&&0<=S);break}}}finally{ce=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?U(e):""}function he(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=me(e.type,!1),e;case 11:return e=me(e.type.render,!1),e;case 1:return e=me(e.type,!0),e;default:return""}}function X(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case W:return"Portal";case ie:return"Profiler";case B:return"StrictMode";case xe:return"Suspense";case J:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Se:return(e.displayName||"Context")+".Consumer";case ue:return(e._context.displayName||"Context")+".Provider";case Te:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ee:return r=e.displayName||null,r!==null?r:X(e.type)||"Memo";case be:r=e._payload,e=e._init;try{return X(e(r))}catch{}}return null}function ve(e){var r=e.type;switch(e.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=r.render,e=e.displayName||e.name||"",r.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(r);case 8:return r===B?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Re(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ge(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function rt(e){var r=ge(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),l=""+e[r];if(!e.hasOwnProperty(r)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var c=i.get,f=i.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return c.call(this)},set:function(g){l=""+g,f.call(this,g)}}),Object.defineProperty(e,r,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(g){l=""+g},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function Ft(e){e._valueTracker||(e._valueTracker=rt(e))}function lt(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var i=r.getValue(),l="";return e&&(l=ge(e)?e.checked?"true":"false":e.value),e=l,e!==i?(r.setValue(e),!0):!1}function Yt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ut(e,r){var i=r.checked;return F({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function Bt(e,r){var i=r.defaultValue==null?"":r.defaultValue,l=r.checked!=null?r.checked:r.defaultChecked;i=Re(r.value!=null?r.value:i),e._wrapperState={initialChecked:l,initialValue:i,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function we(e,r){r=r.checked,r!=null&&T(e,"checked",r,!1)}function ut(e,r){we(e,r);var i=Re(r.value),l=r.type;if(i!=null)l==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}r.hasOwnProperty("value")?Zt(e,r.type,i):r.hasOwnProperty("defaultValue")&&Zt(e,r.type,Re(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(e.defaultChecked=!!r.defaultChecked)}function Jt(e,r,i){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var l=r.type;if(!(l!=="submit"&&l!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+e._wrapperState.initialValue,i||r===e.value||(e.value=r),e.defaultValue=r}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function Zt(e,r,i){(r!=="number"||Yt(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var zn=Array.isArray;function Fn(e,r,i,l){if(e=e.options,r){r={};for(var c=0;c"+r.valueOf().toString()+"",r=mi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;r.firstChild;)e.appendChild(r.firstChild)}});function Zs(e,r){if(r){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=r;return}}e.textContent=r}var eo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vv=["Webkit","ms","Moz","O"];Object.keys(eo).forEach(function(e){vv.forEach(function(r){r=r+e.charAt(0).toUpperCase()+e.substring(1),eo[r]=eo[e]})});function Nd(e,r,i){return r==null||typeof r=="boolean"||r===""?"":i||typeof r!="number"||r===0||eo.hasOwnProperty(e)&&eo[e]?(""+r).trim():r+"px"}function Pd(e,r){e=e.style;for(var i in r)if(r.hasOwnProperty(i)){var l=i.indexOf("--")===0,c=Nd(i,r[i],l);i==="float"&&(i="cssFloat"),l?e.setProperty(i,c):e[i]=c}}var wv=F({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function nl(e,r){if(r){if(wv[e]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(s(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(s(61))}if(r.style!=null&&typeof r.style!="object")throw Error(s(62))}}function rl(e,r){if(e.indexOf("-")===-1)return typeof r.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sl=null;function ol(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var il=null,ls=null,us=null;function Od(e){if(e=Eo(e)){if(typeof il!="function")throw Error(s(280));var r=e.stateNode;r&&(r=zi(r),il(e.stateNode,e.type,r))}}function Ad(e){ls?us?us.push(e):us=[e]:ls=e}function Ld(){if(ls){var e=ls,r=us;if(us=ls=null,Od(e),r)for(e=0;e>>=0,e===0?32:31-(Pv(e)/Ov|0)|0}var xi=64,Si=4194304;function so(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function bi(e,r){var i=e.pendingLanes;if(i===0)return 0;var l=0,c=e.suspendedLanes,f=e.pingedLanes,g=i&268435455;if(g!==0){var S=g&~c;S!==0?l=so(S):(f&=g,f!==0&&(l=so(f)))}else g=i&~c,g!==0?l=so(g):f!==0&&(l=so(f));if(l===0)return 0;if(r!==0&&r!==l&&(r&c)===0&&(c=l&-l,f=r&-r,c>=f||c===16&&(f&4194240)!==0))return r;if((l&4)!==0&&(l|=i&16),r=e.entangledLanes,r!==0)for(e=e.entanglements,r&=l;0i;i++)r.push(e);return r}function oo(e,r,i){e.pendingLanes|=r,r!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,r=31-en(r),e[r]=i}function Iv(e,r){var i=e.pendingLanes&~r;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=r,e.mutableReadLanes&=r,e.entangledLanes&=r,r=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0=po),lf=" ",uf=!1;function cf(e,r){switch(e){case"keyup":return u0.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function df(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var fs=!1;function d0(e,r){switch(e){case"compositionend":return df(r);case"keypress":return r.which!==32?null:(uf=!0,lf);case"textInput":return e=r.data,e===lf&&uf?null:e;default:return null}}function f0(e,r){if(fs)return e==="compositionend"||!_l&&cf(e,r)?(e=tf(),Ri=vl=Vn=null,fs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:i,offset:r-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=vf(i)}}function xf(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?xf(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function Sf(){for(var e=window,r=Yt();r instanceof e.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)e=r.contentWindow;else break;r=Yt(e.document)}return r}function Rl(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}function S0(e){var r=Sf(),i=e.focusedElem,l=e.selectionRange;if(r!==i&&i&&i.ownerDocument&&xf(i.ownerDocument.documentElement,i)){if(l!==null&&Rl(i)){if(r=l.start,e=l.end,e===void 0&&(e=r),"selectionStart"in i)i.selectionStart=r,i.selectionEnd=Math.min(e,i.value.length);else if(e=(r=i.ownerDocument||document)&&r.defaultView||window,e.getSelection){e=e.getSelection();var c=i.textContent.length,f=Math.min(l.start,c);l=l.end===void 0?f:Math.min(l.end,c),!e.extend&&f>l&&(c=l,l=f,f=c),c=wf(i,f);var g=wf(i,l);c&&g&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==g.node||e.focusOffset!==g.offset)&&(r=r.createRange(),r.setStart(c.node,c.offset),e.removeAllRanges(),f>l?(e.addRange(r),e.extend(g.node,g.offset)):(r.setEnd(g.node,g.offset),e.addRange(r)))}}for(r=[],e=i;e=e.parentNode;)e.nodeType===1&&r.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i=document.documentMode,hs=null,Tl=null,vo=null,Nl=!1;function bf(e,r,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Nl||hs==null||hs!==Yt(l)||(l=hs,"selectionStart"in l&&Rl(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),vo&&go(vo,l)||(vo=l,l=Ii(Tl,"onSelect"),0vs||(e.current=Bl[vs],Bl[vs]=null,vs--)}function Fe(e,r){vs++,Bl[vs]=e.current,e.current=r}var Kn={},mt=Qn(Kn),kt=Qn(!1),Cr=Kn;function ws(e,r){var i=e.type.contextTypes;if(!i)return Kn;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===r)return l.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in i)c[f]=r[f];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=c),c}function Ct(e){return e=e.childContextTypes,e!=null}function Fi(){Be(kt),Be(mt)}function Mf(e,r,i){if(mt.current!==Kn)throw Error(s(168));Fe(mt,r),Fe(kt,i)}function zf(e,r,i){var l=e.stateNode;if(r=r.childContextTypes,typeof l.getChildContext!="function")return i;l=l.getChildContext();for(var c in l)if(!(c in r))throw Error(s(108,ve(e)||"Unknown",c));return F({},i,l)}function Ui(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kn,Cr=mt.current,Fe(mt,e),Fe(kt,kt.current),!0}function Ff(e,r,i){var l=e.stateNode;if(!l)throw Error(s(169));i?(e=zf(e,r,Cr),l.__reactInternalMemoizedMergedChildContext=e,Be(kt),Be(mt),Fe(mt,e)):Be(kt),Fe(kt,i)}var kn=null,Bi=!1,$l=!1;function Uf(e){kn===null?kn=[e]:kn.push(e)}function L0(e){Bi=!0,Uf(e)}function Gn(){if(!$l&&kn!==null){$l=!0;var e=0,r=De;try{var i=kn;for(De=1;e>=g,c-=g,Cn=1<<32-en(r)+c|i<ye?(it=fe,fe=null):it=fe.sibling;var Le=V(I,fe,D[ye],Q);if(Le===null){fe===null&&(fe=it);break}e&&fe&&Le.alternate===null&&r(I,fe),N=f(Le,N,ye),de===null?le=Le:de.sibling=Le,de=Le,fe=it}if(ye===D.length)return i(I,fe),$e&&Tr(I,ye),le;if(fe===null){for(;yeye?(it=fe,fe=null):it=fe.sibling;var sr=V(I,fe,Le.value,Q);if(sr===null){fe===null&&(fe=it);break}e&&fe&&sr.alternate===null&&r(I,fe),N=f(sr,N,ye),de===null?le=sr:de.sibling=sr,de=sr,fe=it}if(Le.done)return i(I,fe),$e&&Tr(I,ye),le;if(fe===null){for(;!Le.done;ye++,Le=D.next())Le=q(I,Le.value,Q),Le!==null&&(N=f(Le,N,ye),de===null?le=Le:de.sibling=Le,de=Le);return $e&&Tr(I,ye),le}for(fe=l(I,fe);!Le.done;ye++,Le=D.next())Le=Z(fe,I,ye,Le.value,Q),Le!==null&&(e&&Le.alternate!==null&&fe.delete(Le.key===null?ye:Le.key),N=f(Le,N,ye),de===null?le=Le:de.sibling=Le,de=Le);return e&&fe.forEach(function(hw){return r(I,hw)}),$e&&Tr(I,ye),le}function Ke(I,N,D,Q){if(typeof D=="object"&&D!==null&&D.type===G&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case $:e:{for(var le=D.key,de=N;de!==null;){if(de.key===le){if(le=D.type,le===G){if(de.tag===7){i(I,de.sibling),N=c(de,D.props.children),N.return=I,I=N;break e}}else if(de.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===be&&qf(le)===de.type){i(I,de.sibling),N=c(de,D.props),N.ref=_o(I,de,D),N.return=I,I=N;break e}i(I,de);break}else r(I,de);de=de.sibling}D.type===G?(N=Dr(D.props.children,I.mode,Q,D.key),N.return=I,I=N):(Q=ma(D.type,D.key,D.props,null,I.mode,Q),Q.ref=_o(I,N,D),Q.return=I,I=Q)}return g(I);case W:e:{for(de=D.key;N!==null;){if(N.key===de)if(N.tag===4&&N.stateNode.containerInfo===D.containerInfo&&N.stateNode.implementation===D.implementation){i(I,N.sibling),N=c(N,D.children||[]),N.return=I,I=N;break e}else{i(I,N);break}else r(I,N);N=N.sibling}N=Fu(D,I.mode,Q),N.return=I,I=N}return g(I);case be:return de=D._init,Ke(I,N,de(D._payload),Q)}if(zn(D))return ne(I,N,D,Q);if(ae(D))return oe(I,N,D,Q);Hi(I,D)}return typeof D=="string"&&D!==""||typeof D=="number"?(D=""+D,N!==null&&N.tag===6?(i(I,N.sibling),N=c(N,D),N.return=I,I=N):(i(I,N),N=zu(D,I.mode,Q),N.return=I,I=N),g(I)):i(I,N)}return Ke}var Es=Qf(!0),Kf=Qf(!1),qi=Qn(null),Qi=null,_s=null,Kl=null;function Gl(){Kl=_s=Qi=null}function Xl(e){var r=qi.current;Be(qi),e._currentValue=r}function Yl(e,r,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),e===i)break;e=e.return}}function ks(e,r){Qi=e,Kl=_s=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&r)!==0&&(Rt=!0),e.firstContext=null)}function Vt(e){var r=e._currentValue;if(Kl!==e)if(e={context:e,memoizedValue:r,next:null},_s===null){if(Qi===null)throw Error(s(308));_s=e,Qi.dependencies={lanes:0,firstContext:e}}else _s=_s.next=e;return r}var Nr=null;function Jl(e){Nr===null?Nr=[e]:Nr.push(e)}function Gf(e,r,i,l){var c=r.interleaved;return c===null?(i.next=i,Jl(r)):(i.next=c.next,c.next=i),r.interleaved=i,Tn(e,l)}function Tn(e,r){e.lanes|=r;var i=e.alternate;for(i!==null&&(i.lanes|=r),i=e,e=e.return;e!==null;)e.childLanes|=r,i=e.alternate,i!==null&&(i.childLanes|=r),i=e,e=e.return;return i.tag===3?i.stateNode:null}var Xn=!1;function Zl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xf(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Nn(e,r){return{eventTime:e,lane:r,tag:0,payload:null,callback:null,next:null}}function Yn(e,r,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ae&2)!==0){var c=l.pending;return c===null?r.next=r:(r.next=c.next,c.next=r),l.pending=r,Tn(e,i)}return c=l.interleaved,c===null?(r.next=r,Jl(l)):(r.next=c.next,c.next=r),l.interleaved=r,Tn(e,i)}function Ki(e,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194240)!==0)){var l=r.lanes;l&=e.pendingLanes,i|=l,r.lanes=i,hl(e,i)}}function Yf(e,r){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var c=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var g={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};f===null?c=f=g:f=f.next=g,i=i.next}while(i!==null);f===null?c=f=r:f=f.next=r}else c=f=r;i={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,effects:l.effects},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=r:e.next=r,i.lastBaseUpdate=r}function Gi(e,r,i,l){var c=e.updateQueue;Xn=!1;var f=c.firstBaseUpdate,g=c.lastBaseUpdate,S=c.shared.pending;if(S!==null){c.shared.pending=null;var C=S,z=C.next;C.next=null,g===null?f=z:g.next=z,g=C;var H=e.alternate;H!==null&&(H=H.updateQueue,S=H.lastBaseUpdate,S!==g&&(S===null?H.firstBaseUpdate=z:S.next=z,H.lastBaseUpdate=C))}if(f!==null){var q=c.baseState;g=0,H=z=C=null,S=f;do{var V=S.lane,Z=S.eventTime;if((l&V)===V){H!==null&&(H=H.next={eventTime:Z,lane:0,tag:S.tag,payload:S.payload,callback:S.callback,next:null});e:{var ne=e,oe=S;switch(V=r,Z=i,oe.tag){case 1:if(ne=oe.payload,typeof ne=="function"){q=ne.call(Z,q,V);break e}q=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=oe.payload,V=typeof ne=="function"?ne.call(Z,q,V):ne,V==null)break e;q=F({},q,V);break e;case 2:Xn=!0}}S.callback!==null&&S.lane!==0&&(e.flags|=64,V=c.effects,V===null?c.effects=[S]:V.push(S))}else Z={eventTime:Z,lane:V,tag:S.tag,payload:S.payload,callback:S.callback,next:null},H===null?(z=H=Z,C=q):H=H.next=Z,g|=V;if(S=S.next,S===null){if(S=c.shared.pending,S===null)break;V=S,S=V.next,V.next=null,c.lastBaseUpdate=V,c.shared.pending=null}}while(!0);if(H===null&&(C=q),c.baseState=C,c.firstBaseUpdate=z,c.lastBaseUpdate=H,r=c.shared.interleaved,r!==null){c=r;do g|=c.lane,c=c.next;while(c!==r)}else f===null&&(c.shared.lanes=0);Ar|=g,e.lanes=g,e.memoizedState=q}}function Jf(e,r,i){if(e=r.effects,r.effects=null,e!==null)for(r=0;ri?i:4,e(!0);var l=su.transition;su.transition={};try{e(!1),r()}finally{De=i,su.transition=l}}function gh(){return Ht().memoizedState}function M0(e,r,i){var l=tr(e);if(i={lane:l,action:i,hasEagerState:!1,eagerState:null,next:null},vh(e))wh(r,i);else if(i=Gf(e,r,i,l),i!==null){var c=Et();an(i,e,l,c),xh(i,r,l)}}function z0(e,r,i){var l=tr(e),c={lane:l,action:i,hasEagerState:!1,eagerState:null,next:null};if(vh(e))wh(r,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=r.lastRenderedReducer,f!==null))try{var g=r.lastRenderedState,S=f(g,i);if(c.hasEagerState=!0,c.eagerState=S,tn(S,g)){var C=r.interleaved;C===null?(c.next=c,Jl(r)):(c.next=C.next,C.next=c),r.interleaved=c;return}}catch{}finally{}i=Gf(e,r,c,l),i!==null&&(c=Et(),an(i,e,l,c),xh(i,r,l))}}function vh(e){var r=e.alternate;return e===Ve||r!==null&&r===Ve}function wh(e,r){To=Ji=!0;var i=e.pending;i===null?r.next=r:(r.next=i.next,i.next=r),e.pending=r}function xh(e,r,i){if((i&4194240)!==0){var l=r.lanes;l&=e.pendingLanes,i|=l,r.lanes=i,hl(e,i)}}var ta={readContext:Vt,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useInsertionEffect:yt,useLayoutEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useMutableSource:yt,useSyncExternalStore:yt,useId:yt,unstable_isNewReconciler:!1},F0={readContext:Vt,useCallback:function(e,r){return mn().memoizedState=[e,r===void 0?null:r],e},useContext:Vt,useEffect:uh,useImperativeHandle:function(e,r,i){return i=i!=null?i.concat([e]):null,Zi(4194308,4,fh.bind(null,r,e),i)},useLayoutEffect:function(e,r){return Zi(4194308,4,e,r)},useInsertionEffect:function(e,r){return Zi(4,2,e,r)},useMemo:function(e,r){var i=mn();return r=r===void 0?null:r,e=e(),i.memoizedState=[e,r],e},useReducer:function(e,r,i){var l=mn();return r=i!==void 0?i(r):r,l.memoizedState=l.baseState=r,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=M0.bind(null,Ve,e),[l.memoizedState,e]},useRef:function(e){var r=mn();return e={current:e},r.memoizedState=e},useState:ah,useDebugValue:du,useDeferredValue:function(e){return mn().memoizedState=e},useTransition:function(){var e=ah(!1),r=e[0];return e=D0.bind(null,e[1]),mn().memoizedState=e,[r,e]},useMutableSource:function(){},useSyncExternalStore:function(e,r,i){var l=Ve,c=mn();if($e){if(i===void 0)throw Error(s(407));i=i()}else{if(i=r(),ot===null)throw Error(s(349));(Or&30)!==0||nh(l,r,i)}c.memoizedState=i;var f={value:i,getSnapshot:r};return c.queue=f,uh(sh.bind(null,l,f,e),[e]),l.flags|=2048,Oo(9,rh.bind(null,l,f,i,r),void 0,null),i},useId:function(){var e=mn(),r=ot.identifierPrefix;if($e){var i=Rn,l=Cn;i=(l&~(1<<32-en(l)-1)).toString(32)+i,r=":"+r+"R"+i,i=No++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=g.createElement(i,{is:l.is}):(e=g.createElement(i),i==="select"&&(g=e,l.multiple?g.multiple=!0:l.size&&(g.size=l.size))):e=g.createElementNS(e,i),e[hn]=r,e[bo]=l,Uh(e,r,!1,!1),r.stateNode=e;e:{switch(g=rl(i,l),i){case"dialog":Ue("cancel",e),Ue("close",e),c=l;break;case"iframe":case"object":case"embed":Ue("load",e),c=l;break;case"video":case"audio":for(c=0;cPs&&(r.flags|=128,l=!0,Ao(f,!1),r.lanes=4194304)}else{if(!l)if(e=Xi(g),e!==null){if(r.flags|=128,l=!0,i=e.updateQueue,i!==null&&(r.updateQueue=i,r.flags|=4),Ao(f,!0),f.tail===null&&f.tailMode==="hidden"&&!g.alternate&&!$e)return gt(r),null}else 2*Qe()-f.renderingStartTime>Ps&&i!==1073741824&&(r.flags|=128,l=!0,Ao(f,!1),r.lanes=4194304);f.isBackwards?(g.sibling=r.child,r.child=g):(i=f.last,i!==null?i.sibling=g:r.child=g,f.last=g)}return f.tail!==null?(r=f.tail,f.rendering=r,f.tail=r.sibling,f.renderingStartTime=Qe(),r.sibling=null,i=We.current,Fe(We,l?i&1|2:i&1),r):(gt(r),null);case 22:case 23:return Iu(),l=r.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(r.flags|=8192),l&&(r.mode&1)!==0?(Mt&1073741824)!==0&&(gt(r),r.subtreeFlags&6&&(r.flags|=8192)):gt(r),null;case 24:return null;case 25:return null}throw Error(s(156,r.tag))}function Q0(e,r){switch(Vl(r),r.tag){case 1:return Ct(r.type)&&Fi(),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return Cs(),Be(kt),Be(mt),ru(),e=r.flags,(e&65536)!==0&&(e&128)===0?(r.flags=e&-65537|128,r):null;case 5:return tu(r),null;case 13:if(Be(We),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(s(340));bs()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return Be(We),null;case 4:return Cs(),null;case 10:return Xl(r.type._context),null;case 22:case 23:return Iu(),null;case 24:return null;default:return null}}var oa=!1,vt=!1,K0=typeof WeakSet=="function"?WeakSet:Set,te=null;function Ts(e,r){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(l){He(e,r,l)}else i.current=null}function Eu(e,r,i){try{i()}catch(l){He(e,r,l)}}var Wh=!1;function G0(e,r){if(Il=ki,e=Sf(),Rl(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var g=0,S=-1,C=-1,z=0,H=0,q=e,V=null;t:for(;;){for(var Z;q!==i||c!==0&&q.nodeType!==3||(S=g+c),q!==f||l!==0&&q.nodeType!==3||(C=g+l),q.nodeType===3&&(g+=q.nodeValue.length),(Z=q.firstChild)!==null;)V=q,q=Z;for(;;){if(q===e)break t;if(V===i&&++z===c&&(S=g),V===f&&++H===l&&(C=g),(Z=q.nextSibling)!==null)break;q=V,V=q.parentNode}q=Z}i=S===-1||C===-1?null:{start:S,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(Dl={focusedElem:e,selectionRange:i},ki=!1,te=r;te!==null;)if(r=te,e=r.child,(r.subtreeFlags&1028)!==0&&e!==null)e.return=r,te=e;else for(;te!==null;){r=te;try{var ne=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(ne!==null){var oe=ne.memoizedProps,Ke=ne.memoizedState,I=r.stateNode,N=I.getSnapshotBeforeUpdate(r.elementType===r.type?oe:rn(r.type,oe),Ke);I.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var D=r.stateNode.containerInfo;D.nodeType===1?D.textContent="":D.nodeType===9&&D.documentElement&&D.removeChild(D.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Q){He(r,r.return,Q)}if(e=r.sibling,e!==null){e.return=r.return,te=e;break}te=r.return}return ne=Wh,Wh=!1,ne}function Lo(e,r,i){var l=r.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&Eu(r,i,f)}c=c.next}while(c!==l)}}function ia(e,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.create;i.destroy=l()}i=i.next}while(i!==r)}}function _u(e){var r=e.ref;if(r!==null){var i=e.stateNode;switch(e.tag){case 5:e=i;break;default:e=i}typeof r=="function"?r(e):r.current=e}}function Vh(e){var r=e.alternate;r!==null&&(e.alternate=null,Vh(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&(delete r[hn],delete r[bo],delete r[Ul],delete r[O0],delete r[A0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Hh(e){return e.tag===5||e.tag===3||e.tag===4}function qh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Hh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ku(e,r,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?i.nodeType===8?i.parentNode.insertBefore(e,r):i.insertBefore(e,r):(i.nodeType===8?(r=i.parentNode,r.insertBefore(e,i)):(r=i,r.appendChild(e)),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=Mi));else if(l!==4&&(e=e.child,e!==null))for(ku(e,r,i),e=e.sibling;e!==null;)ku(e,r,i),e=e.sibling}function Cu(e,r,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?i.insertBefore(e,r):i.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(Cu(e,r,i),e=e.sibling;e!==null;)Cu(e,r,i),e=e.sibling}var ct=null,sn=!1;function Jn(e,r,i){for(i=i.child;i!==null;)Qh(e,r,i),i=i.sibling}function Qh(e,r,i){if(fn&&typeof fn.onCommitFiberUnmount=="function")try{fn.onCommitFiberUnmount(wi,i)}catch{}switch(i.tag){case 5:vt||Ts(i,r);case 6:var l=ct,c=sn;ct=null,Jn(e,r,i),ct=l,sn=c,ct!==null&&(sn?(e=ct,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):ct.removeChild(i.stateNode));break;case 18:ct!==null&&(sn?(e=ct,i=i.stateNode,e.nodeType===8?Fl(e.parentNode,i):e.nodeType===1&&Fl(e,i),co(e)):Fl(ct,i.stateNode));break;case 4:l=ct,c=sn,ct=i.stateNode.containerInfo,sn=!0,Jn(e,r,i),ct=l,sn=c;break;case 0:case 11:case 14:case 15:if(!vt&&(l=i.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var f=c,g=f.destroy;f=f.tag,g!==void 0&&((f&2)!==0||(f&4)!==0)&&Eu(i,r,g),c=c.next}while(c!==l)}Jn(e,r,i);break;case 1:if(!vt&&(Ts(i,r),l=i.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=i.memoizedProps,l.state=i.memoizedState,l.componentWillUnmount()}catch(S){He(i,r,S)}Jn(e,r,i);break;case 21:Jn(e,r,i);break;case 22:i.mode&1?(vt=(l=vt)||i.memoizedState!==null,Jn(e,r,i),vt=l):Jn(e,r,i);break;default:Jn(e,r,i)}}function Kh(e){var r=e.updateQueue;if(r!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new K0),r.forEach(function(l){var c=sw.bind(null,e,l);i.has(l)||(i.add(l),l.then(c,c))})}}function on(e,r){var i=r.deletions;if(i!==null)for(var l=0;lc&&(c=g),l&=~f}if(l=c,l=Qe()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*Y0(l/1960))-l,10e?16:e,er===null)var l=!1;else{if(e=er,er=null,da=0,(Ae&6)!==0)throw Error(s(331));var c=Ae;for(Ae|=4,te=e.current;te!==null;){var f=te,g=f.child;if((te.flags&16)!==0){var S=f.deletions;if(S!==null){for(var C=0;CQe()-Nu?jr(e,0):Tu|=i),Nt(e,r)}function ap(e,r){r===0&&((e.mode&1)===0?r=1:(r=Si,Si<<=1,(Si&130023424)===0&&(Si=4194304)));var i=Et();e=Tn(e,r),e!==null&&(oo(e,r,i),Nt(e,i))}function rw(e){var r=e.memoizedState,i=0;r!==null&&(i=r.retryLane),ap(e,i)}function sw(e,r){var i=0;switch(e.tag){case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(i=c.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(s(314))}l!==null&&l.delete(r),ap(e,i)}var lp;lp=function(e,r,i){if(e!==null)if(e.memoizedProps!==r.pendingProps||kt.current)Rt=!0;else{if((e.lanes&i)===0&&(r.flags&128)===0)return Rt=!1,H0(e,r,i);Rt=(e.flags&131072)!==0}else Rt=!1,$e&&(r.flags&1048576)!==0&&Bf(r,Wi,r.index);switch(r.lanes=0,r.tag){case 2:var l=r.type;sa(e,r),e=r.pendingProps;var c=ws(r,mt.current);ks(r,i),c=iu(null,r,l,e,c,i);var f=au();return r.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,Ct(l)?(f=!0,Ui(r)):f=!1,r.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Zl(r),c.updater=na,r.stateNode=c,c._reactInternals=r,hu(r,l,e,i),r=gu(null,r,l,!0,f,i)):(r.tag=0,$e&&f&&Wl(r),bt(null,r,c,i),r=r.child),r;case 16:l=r.elementType;e:{switch(sa(e,r),e=r.pendingProps,c=l._init,l=c(l._payload),r.type=l,c=r.tag=iw(l),e=rn(l,e),c){case 0:r=yu(null,r,l,e,i);break e;case 1:r=jh(null,r,l,e,i);break e;case 11:r=Nh(null,r,l,e,i);break e;case 14:r=Ph(null,r,l,rn(l.type,e),i);break e}throw Error(s(306,l,""))}return r;case 0:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),yu(e,r,l,c,i);case 1:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),jh(e,r,l,c,i);case 3:e:{if(Ih(r),e===null)throw Error(s(387));l=r.pendingProps,f=r.memoizedState,c=f.element,Xf(e,r),Gi(r,l,null,i);var g=r.memoizedState;if(l=g.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},r.updateQueue.baseState=f,r.memoizedState=f,r.flags&256){c=Rs(Error(s(423)),r),r=Dh(e,r,l,i,c);break e}else if(l!==c){c=Rs(Error(s(424)),r),r=Dh(e,r,l,i,c);break e}else for(Dt=qn(r.stateNode.containerInfo.firstChild),It=r,$e=!0,nn=null,i=Kf(r,null,l,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(bs(),l===c){r=Pn(e,r,i);break e}bt(e,r,l,i)}r=r.child}return r;case 5:return Zf(r),e===null&&ql(r),l=r.type,c=r.pendingProps,f=e!==null?e.memoizedProps:null,g=c.children,Ml(l,c)?g=null:f!==null&&Ml(l,f)&&(r.flags|=32),Lh(e,r),bt(e,r,g,i),r.child;case 6:return e===null&&ql(r),null;case 13:return Mh(e,r,i);case 4:return eu(r,r.stateNode.containerInfo),l=r.pendingProps,e===null?r.child=Es(r,null,l,i):bt(e,r,l,i),r.child;case 11:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),Nh(e,r,l,c,i);case 7:return bt(e,r,r.pendingProps,i),r.child;case 8:return bt(e,r,r.pendingProps.children,i),r.child;case 12:return bt(e,r,r.pendingProps.children,i),r.child;case 10:e:{if(l=r.type._context,c=r.pendingProps,f=r.memoizedProps,g=c.value,Fe(qi,l._currentValue),l._currentValue=g,f!==null)if(tn(f.value,g)){if(f.children===c.children&&!kt.current){r=Pn(e,r,i);break e}}else for(f=r.child,f!==null&&(f.return=r);f!==null;){var S=f.dependencies;if(S!==null){g=f.child;for(var C=S.firstContext;C!==null;){if(C.context===l){if(f.tag===1){C=Nn(-1,i&-i),C.tag=2;var z=f.updateQueue;if(z!==null){z=z.shared;var H=z.pending;H===null?C.next=C:(C.next=H.next,H.next=C),z.pending=C}}f.lanes|=i,C=f.alternate,C!==null&&(C.lanes|=i),Yl(f.return,i,r),S.lanes|=i;break}C=C.next}}else if(f.tag===10)g=f.type===r.type?null:f.child;else if(f.tag===18){if(g=f.return,g===null)throw Error(s(341));g.lanes|=i,S=g.alternate,S!==null&&(S.lanes|=i),Yl(g,i,r),g=f.sibling}else g=f.child;if(g!==null)g.return=f;else for(g=f;g!==null;){if(g===r){g=null;break}if(f=g.sibling,f!==null){f.return=g.return,g=f;break}g=g.return}f=g}bt(e,r,c.children,i),r=r.child}return r;case 9:return c=r.type,l=r.pendingProps.children,ks(r,i),c=Vt(c),l=l(c),r.flags|=1,bt(e,r,l,i),r.child;case 14:return l=r.type,c=rn(l,r.pendingProps),c=rn(l.type,c),Ph(e,r,l,c,i);case 15:return Oh(e,r,r.type,r.pendingProps,i);case 17:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),sa(e,r),r.tag=1,Ct(l)?(e=!0,Ui(r)):e=!1,ks(r,i),bh(r,l,c),hu(r,l,c,i),gu(null,r,l,!0,e,i);case 19:return Fh(e,r,i);case 22:return Ah(e,r,i)}throw Error(s(156,r.tag))};function up(e,r){return Bd(e,r)}function ow(e,r,i,l){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qt(e,r,i,l){return new ow(e,r,i,l)}function Mu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function iw(e){if(typeof e=="function")return Mu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Te)return 11;if(e===Ee)return 14}return 2}function rr(e,r){var i=e.alternate;return i===null?(i=Qt(e.tag,r,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=r,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&14680064,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,r=e.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function ma(e,r,i,l,c,f){var g=2;if(l=e,typeof e=="function")Mu(e)&&(g=1);else if(typeof e=="string")g=5;else e:switch(e){case G:return Dr(i.children,c,f,r);case B:g=8,c|=8;break;case ie:return e=Qt(12,i,r,c|2),e.elementType=ie,e.lanes=f,e;case xe:return e=Qt(13,i,r,c),e.elementType=xe,e.lanes=f,e;case J:return e=Qt(19,i,r,c),e.elementType=J,e.lanes=f,e;case _e:return ya(i,c,f,r);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ue:g=10;break e;case Se:g=9;break e;case Te:g=11;break e;case Ee:g=14;break e;case be:g=16,l=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return r=Qt(g,i,r,c),r.elementType=e,r.type=l,r.lanes=f,r}function Dr(e,r,i,l){return e=Qt(7,e,l,r),e.lanes=i,e}function ya(e,r,i,l){return e=Qt(22,e,l,r),e.elementType=_e,e.lanes=i,e.stateNode={isHidden:!1},e}function zu(e,r,i){return e=Qt(6,e,null,r),e.lanes=i,e}function Fu(e,r,i){return r=Qt(4,e.children!==null?e.children:[],e.key,r),r.lanes=i,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}function aw(e,r,i,l,c){this.tag=r,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=fl(0),this.expirationTimes=fl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fl(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Uu(e,r,i,l,c,f,g,S,C){return e=new aw(e,r,i,S,C),r===1?(r=1,f===!0&&(r|=8)):r=0,f=Qt(3,null,null,r),e.current=f,f.stateNode=e,f.memoizedState={element:l,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zl(f),e}function lw(e,r,i){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),Qu.exports=bw(),Qu.exports}var _p;function Ew(){if(_p)return _a;_p=1;var n=sy();return _a.createRoot=n.createRoot,_a.hydrateRoot=n.hydrateRoot,_a}var _w=Ew();const kw=Kc(_w),Cw=20,Rw=1e6,Mn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Xu=0;function Tw(){return Xu=(Xu+1)%Number.MAX_VALUE,Xu.toString()}const Yu=new Map,kp=n=>{if(Yu.has(n))return;const t=setTimeout(()=>{Yu.delete(n),Ko({type:Mn.REMOVE_TOAST,toastId:n})},Rw);Yu.set(n,t)},Nw=(n,t)=>{switch(t.type){case Mn.ADD_TOAST:return{...n,toasts:[t.toast,...n.toasts].slice(0,Cw)};case Mn.UPDATE_TOAST:return{...n,toasts:n.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case Mn.DISMISS_TOAST:{const{toastId:s}=t;return s?kp(s):n.toasts.forEach(o=>{kp(o.id)}),{...n,toasts:n.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case Mn.REMOVE_TOAST:return t.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(s=>s.id!==t.toastId)}}},ja=[];let Ia={toasts:[]};function Ko(n){Ia=Nw(Ia,n),ja.forEach(t=>{t(Ia)})}function Pw({...n}){const t=Tw(),s=a=>Ko({type:Mn.UPDATE_TOAST,toast:{...a,id:t}}),o=()=>Ko({type:Mn.DISMISS_TOAST,toastId:t});return Ko({type:Mn.ADD_TOAST,toast:{...n,id:t,open:!0,onOpenChange:a=>{a||o()}}}),{id:t,dismiss:o,update:s}}function Ow(){const[n,t]=E.useState(Ia);return E.useEffect(()=>(ja.push(t),()=>{const s=ja.indexOf(t);s>-1&&ja.splice(s,1)}),[n]),{...n,toast:Pw,dismiss:s=>Ko({type:Mn.DISMISS_TOAST,toastId:s})}}var Xc=sy();const Aw=Kc(Xc);function zt(n,t,{checkForDefaultPrevented:s=!0}={}){return function(a){if(n==null||n(a),s===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Cp(n,t){if(typeof n=="function")return n(t);n!=null&&(n.current=t)}function Yc(...n){return t=>{let s=!1;const o=n.map(a=>{const u=Cp(a,t);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let a=0;a{var b;const{scope:_,children:L,...M}=w,k=((b=_==null?void 0:_[n])==null?void 0:b[p])||h,x=E.useMemo(()=>M,Object.values(M));return y.jsx(k.Provider,{value:x,children:L})};m.displayName=u+"Provider";function v(w,_){var k;const L=((k=_==null?void 0:_[n])==null?void 0:k[p])||h,M=E.useContext(L);if(M)return M;if(d!==void 0)return d;throw new Error(`\`${w}\` must be used within \`${u}\``)}return[m,v]}const a=()=>{const u=s.map(d=>E.createContext(d));return function(h){const p=(h==null?void 0:h[n])||u;return E.useMemo(()=>({[`__scope${n}`]:{...h,[n]:p}}),[h,p])}};return a.scopeName=n,[o,Lw(a,...t)]}function Lw(...n){const t=n[0];if(n.length===1)return t;const s=()=>{const o=n.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(u){const d=o.reduce((h,{useScope:p,scopeName:m})=>{const w=p(u)[`__scope${m}`];return{...h,...w}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return s.scopeName=t.scopeName,s}function Rp(n){const t=jw(n),s=E.forwardRef((o,a)=>{const{children:u,...d}=o,h=E.Children.toArray(u),p=h.find(Dw);if(p){const m=p.props.children,v=h.map(w=>w===p?E.Children.count(m)>1?E.Children.only(null):E.isValidElement(m)?m.props.children:null:w);return y.jsx(t,{...d,ref:a,children:E.isValidElement(m)?E.cloneElement(m,void 0,v):null})}return y.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${n}.Slot`,s}function jw(n){const t=E.forwardRef((s,o)=>{const{children:a,...u}=s;if(E.isValidElement(a)){const d=zw(a),h=Mw(u,a.props);return a.type!==E.Fragment&&(h.ref=o?Yc(o,d):d),E.cloneElement(a,h)}return E.Children.count(a)>1?E.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var Iw=Symbol("radix.slottable");function Dw(n){return E.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Iw}function Mw(n,t){const s={...t};for(const o in t){const a=n[o],u=t[o];/^on[A-Z]/.test(o)?a&&u?s[o]=(...h)=>{const p=u(...h);return a(...h),p}:a&&(s[o]=a):o==="style"?s[o]={...a,...u}:o==="className"&&(s[o]=[a,u].filter(Boolean).join(" "))}return{...n,...s}}function zw(n){var o,a;let t=(o=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}function Fw(n){const t=n+"CollectionProvider",[s,o]=oy(t),[a,u]=s(t,{collectionRef:{current:null},itemMap:new Map}),d=k=>{const{scope:x,children:b}=k,j=ar.useRef(null),T=ar.useRef(new Map).current;return y.jsx(a,{scope:x,itemMap:T,collectionRef:j,children:b})};d.displayName=t;const h=n+"CollectionSlot",p=Rp(h),m=ar.forwardRef((k,x)=>{const{scope:b,children:j}=k,T=u(h,b),A=es(x,T.collectionRef);return y.jsx(p,{ref:A,children:j})});m.displayName=h;const v=n+"CollectionItemSlot",w="data-radix-collection-item",_=Rp(v),L=ar.forwardRef((k,x)=>{const{scope:b,children:j,...T}=k,A=ar.useRef(null),$=es(x,A),W=u(v,b);return ar.useEffect(()=>(W.itemMap.set(A,{ref:A,...T}),()=>void W.itemMap.delete(A))),y.jsx(_,{[w]:"",ref:$,children:j})});L.displayName=v;function M(k){const x=u(n+"CollectionConsumer",k);return ar.useCallback(()=>{const j=x.collectionRef.current;if(!j)return[];const T=Array.from(j.querySelectorAll(`[${w}]`));return Array.from(x.itemMap.values()).sort((W,G)=>T.indexOf(W.ref.current)-T.indexOf(G.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:d,Slot:m,ItemSlot:L},M,o]}function Uw(n){const t=Bw(n),s=E.forwardRef((o,a)=>{const{children:u,...d}=o,h=E.Children.toArray(u),p=h.find(Ww);if(p){const m=p.props.children,v=h.map(w=>w===p?E.Children.count(m)>1?E.Children.only(null):E.isValidElement(m)?m.props.children:null:w);return y.jsx(t,{...d,ref:a,children:E.isValidElement(m)?E.cloneElement(m,void 0,v):null})}return y.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${n}.Slot`,s}function Bw(n){const t=E.forwardRef((s,o)=>{const{children:a,...u}=s;if(E.isValidElement(a)){const d=Hw(a),h=Vw(u,a.props);return a.type!==E.Fragment&&(h.ref=o?Yc(o,d):d),E.cloneElement(a,h)}return E.Children.count(a)>1?E.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var $w=Symbol("radix.slottable");function Ww(n){return E.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===$w}function Vw(n,t){const s={...t};for(const o in t){const a=n[o],u=t[o];/^on[A-Z]/.test(o)?a&&u?s[o]=(...h)=>{const p=u(...h);return a(...h),p}:a&&(s[o]=a):o==="style"?s[o]={...a,...u}:o==="className"&&(s[o]=[a,u].filter(Boolean).join(" "))}return{...n,...s}}function Hw(n){var o,a;let t=(o=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var qw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],bn=qw.reduce((n,t)=>{const s=Uw(`Primitive.${t}`),o=E.forwardRef((a,u)=>{const{asChild:d,...h}=a,p=d?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(p,{...h,ref:u})});return o.displayName=`Primitive.${t}`,{...n,[t]:o}},{});function iy(n,t){n&&Xc.flushSync(()=>n.dispatchEvent(t))}function ts(n){const t=E.useRef(n);return E.useEffect(()=>{t.current=n}),E.useMemo(()=>(...s)=>{var o;return(o=t.current)==null?void 0:o.call(t,...s)},[])}function Qw(n,t=globalThis==null?void 0:globalThis.document){const s=ts(n);E.useEffect(()=>{const o=a=>{a.key==="Escape"&&s(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[s,t])}var Kw="DismissableLayer",hc="dismissableLayer.update",Gw="dismissableLayer.pointerDownOutside",Xw="dismissableLayer.focusOutside",Tp,ay=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ly=E.forwardRef((n,t)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:d,onDismiss:h,...p}=n,m=E.useContext(ay),[v,w]=E.useState(null),_=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,L]=E.useState({}),M=es(t,G=>w(G)),k=Array.from(m.layers),[x]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),b=k.indexOf(x),j=v?k.indexOf(v):-1,T=m.layersWithOutsidePointerEventsDisabled.size>0,A=j>=b,$=Jw(G=>{const B=G.target,ie=[...m.branches].some(ue=>ue.contains(B));!A||ie||(a==null||a(G),d==null||d(G),G.defaultPrevented||h==null||h())},_),W=Zw(G=>{const B=G.target;[...m.branches].some(ue=>ue.contains(B))||(u==null||u(G),d==null||d(G),G.defaultPrevented||h==null||h())},_);return Qw(G=>{j===m.layers.size-1&&(o==null||o(G),!G.defaultPrevented&&h&&(G.preventDefault(),h()))},_),E.useEffect(()=>{if(v)return s&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(Tp=_.body.style.pointerEvents,_.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(v)),m.layers.add(v),Np(),()=>{s&&m.layersWithOutsidePointerEventsDisabled.size===1&&(_.body.style.pointerEvents=Tp)}},[v,_,s,m]),E.useEffect(()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),Np())},[v,m]),E.useEffect(()=>{const G=()=>L({});return document.addEventListener(hc,G),()=>document.removeEventListener(hc,G)},[]),y.jsx(bn.div,{...p,ref:M,style:{pointerEvents:T?A?"auto":"none":void 0,...n.style},onFocusCapture:zt(n.onFocusCapture,W.onFocusCapture),onBlurCapture:zt(n.onBlurCapture,W.onBlurCapture),onPointerDownCapture:zt(n.onPointerDownCapture,$.onPointerDownCapture)})});ly.displayName=Kw;var Yw="DismissableLayerBranch",uy=E.forwardRef((n,t)=>{const s=E.useContext(ay),o=E.useRef(null),a=es(t,o);return E.useEffect(()=>{const u=o.current;if(u)return s.branches.add(u),()=>{s.branches.delete(u)}},[s.branches]),y.jsx(bn.div,{...n,ref:a})});uy.displayName=Yw;function Jw(n,t=globalThis==null?void 0:globalThis.document){const s=ts(n),o=E.useRef(!1),a=E.useRef(()=>{});return E.useEffect(()=>{const u=h=>{if(h.target&&!o.current){let p=function(){cy(Gw,s,m,{discrete:!0})};const m={originalEvent:h};h.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=p,t.addEventListener("click",a.current,{once:!0})):p()}else t.removeEventListener("click",a.current);o.current=!1},d=window.setTimeout(()=>{t.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),t.removeEventListener("pointerdown",u),t.removeEventListener("click",a.current)}},[t,s]),{onPointerDownCapture:()=>o.current=!0}}function Zw(n,t=globalThis==null?void 0:globalThis.document){const s=ts(n),o=E.useRef(!1);return E.useEffect(()=>{const a=u=>{u.target&&!o.current&&cy(Xw,s,{originalEvent:u},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Np(){const n=new CustomEvent(hc);document.dispatchEvent(n)}function cy(n,t,s,{discrete:o}){const a=s.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:s});t&&a.addEventListener(n,t,{once:!0}),o?iy(a,u):a.dispatchEvent(u)}var ex=ly,tx=uy,Xo=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},nx="Portal",dy=E.forwardRef((n,t)=>{var h;const{container:s,...o}=n,[a,u]=E.useState(!1);Xo(()=>u(!0),[]);const d=s||a&&((h=globalThis==null?void 0:globalThis.document)==null?void 0:h.body);return d?Aw.createPortal(y.jsx(bn.div,{...o,ref:t}),d):null});dy.displayName=nx;function rx(n,t){return E.useReducer((s,o)=>t[s][o]??s,n)}var fy=n=>{const{present:t,children:s}=n,o=sx(t),a=typeof s=="function"?s({present:o.isPresent}):E.Children.only(s),u=es(o.ref,ox(a));return typeof s=="function"||o.isPresent?E.cloneElement(a,{ref:u}):null};fy.displayName="Presence";function sx(n){const[t,s]=E.useState(),o=E.useRef(null),a=E.useRef(n),u=E.useRef("none"),d=n?"mounted":"unmounted",[h,p]=rx(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const m=ka(o.current);u.current=h==="mounted"?m:"none"},[h]),Xo(()=>{const m=o.current,v=a.current;if(v!==n){const _=u.current,L=ka(m);n?p("MOUNT"):L==="none"||(m==null?void 0:m.display)==="none"?p("UNMOUNT"):p(v&&_!==L?"ANIMATION_OUT":"UNMOUNT"),a.current=n}},[n,p]),Xo(()=>{if(t){let m;const v=t.ownerDocument.defaultView??window,w=L=>{const k=ka(o.current).includes(CSS.escape(L.animationName));if(L.target===t&&k&&(p("ANIMATION_END"),!a.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",m=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},_=L=>{L.target===t&&(u.current=ka(o.current))};return t.addEventListener("animationstart",_),t.addEventListener("animationcancel",w),t.addEventListener("animationend",w),()=>{v.clearTimeout(m),t.removeEventListener("animationstart",_),t.removeEventListener("animationcancel",w),t.removeEventListener("animationend",w)}}else p("ANIMATION_END")},[t,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:E.useCallback(m=>{o.current=m?getComputedStyle(m):null,s(m)},[])}}function ka(n){return(n==null?void 0:n.animationName)||"none"}function ox(n){var o,a;let t=(o=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var ix=ry[" useInsertionEffect ".trim().toString()]||Xo;function ax({prop:n,defaultProp:t,onChange:s=()=>{},caller:o}){const[a,u,d]=lx({defaultProp:t,onChange:s}),h=n!==void 0,p=h?n:a;{const v=E.useRef(n!==void 0);E.useEffect(()=>{const w=v.current;w!==h&&console.warn(`${o} is changing from ${w?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=h},[h,o])}const m=E.useCallback(v=>{var w;if(h){const _=ux(v)?v(n):v;_!==n&&((w=d.current)==null||w.call(d,_))}else u(v)},[h,n,u,d]);return[p,m]}function lx({defaultProp:n,onChange:t}){const[s,o]=E.useState(n),a=E.useRef(s),u=E.useRef(t);return ix(()=>{u.current=t},[t]),E.useEffect(()=>{var d;a.current!==s&&((d=u.current)==null||d.call(u,s),a.current=s)},[s,a]),[s,o,u]}function ux(n){return typeof n=="function"}var cx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),dx="VisuallyHidden",Jc=E.forwardRef((n,t)=>y.jsx(bn.span,{...n,ref:t,style:{...cx,...n.style}}));Jc.displayName=dx;var Zc="ToastProvider",[ed,fx,hx]=Fw("Toast"),[hy]=oy("Toast",[hx]),[px,Ga]=hy(Zc),py=n=>{const{__scopeToast:t,label:s="Notification",duration:o=5e3,swipeDirection:a="right",swipeThreshold:u=50,children:d}=n,[h,p]=E.useState(null),[m,v]=E.useState(0),w=E.useRef(!1),_=E.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${Zc}\`. Expected non-empty \`string\`.`),y.jsx(ed.Provider,{scope:t,children:y.jsx(px,{scope:t,label:s,duration:o,swipeDirection:a,swipeThreshold:u,toastCount:m,viewport:h,onViewportChange:p,onToastAdd:E.useCallback(()=>v(L=>L+1),[]),onToastRemove:E.useCallback(()=>v(L=>L-1),[]),isFocusedToastEscapeKeyDownRef:w,isClosePausedRef:_,children:d})})};py.displayName=Zc;var my="ToastViewport",mx=["F8"],pc="toast.viewportPause",mc="toast.viewportResume",yy=E.forwardRef((n,t)=>{const{__scopeToast:s,hotkey:o=mx,label:a="Notifications ({hotkey})",...u}=n,d=Ga(my,s),h=fx(s),p=E.useRef(null),m=E.useRef(null),v=E.useRef(null),w=E.useRef(null),_=es(t,w,d.onViewportChange),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=d.toastCount>0;E.useEffect(()=>{const x=b=>{var T;o.length!==0&&o.every(A=>b[A]||b.code===A)&&((T=w.current)==null||T.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[o]),E.useEffect(()=>{const x=p.current,b=w.current;if(M&&x&&b){const j=()=>{if(!d.isClosePausedRef.current){const W=new CustomEvent(pc);b.dispatchEvent(W),d.isClosePausedRef.current=!0}},T=()=>{if(d.isClosePausedRef.current){const W=new CustomEvent(mc);b.dispatchEvent(W),d.isClosePausedRef.current=!1}},A=W=>{!x.contains(W.relatedTarget)&&T()},$=()=>{x.contains(document.activeElement)||T()};return x.addEventListener("focusin",j),x.addEventListener("focusout",A),x.addEventListener("pointermove",j),x.addEventListener("pointerleave",$),window.addEventListener("blur",j),window.addEventListener("focus",T),()=>{x.removeEventListener("focusin",j),x.removeEventListener("focusout",A),x.removeEventListener("pointermove",j),x.removeEventListener("pointerleave",$),window.removeEventListener("blur",j),window.removeEventListener("focus",T)}}},[M,d.isClosePausedRef]);const k=E.useCallback(({tabbingDirection:x})=>{const j=h().map(T=>{const A=T.ref.current,$=[A,...Tx(A)];return x==="forwards"?$:$.reverse()});return(x==="forwards"?j.reverse():j).flat()},[h]);return E.useEffect(()=>{const x=w.current;if(x){const b=j=>{var $,W,G;const T=j.altKey||j.ctrlKey||j.metaKey;if(j.key==="Tab"&&!T){const B=document.activeElement,ie=j.shiftKey;if(j.target===x&&ie){($=m.current)==null||$.focus();return}const Te=k({tabbingDirection:ie?"backwards":"forwards"}),xe=Te.findIndex(J=>J===B);Ju(Te.slice(xe+1))?j.preventDefault():ie?(W=m.current)==null||W.focus():(G=v.current)==null||G.focus()}};return x.addEventListener("keydown",b),()=>x.removeEventListener("keydown",b)}},[h,k]),y.jsxs(tx,{ref:p,role:"region","aria-label":a.replace("{hotkey}",L),tabIndex:-1,style:{pointerEvents:M?void 0:"none"},children:[M&&y.jsx(yc,{ref:m,onFocusFromOutsideViewport:()=>{const x=k({tabbingDirection:"forwards"});Ju(x)}}),y.jsx(ed.Slot,{scope:s,children:y.jsx(bn.ol,{tabIndex:-1,...u,ref:_})}),M&&y.jsx(yc,{ref:v,onFocusFromOutsideViewport:()=>{const x=k({tabbingDirection:"backwards"});Ju(x)}})]})});yy.displayName=my;var gy="ToastFocusProxy",yc=E.forwardRef((n,t)=>{const{__scopeToast:s,onFocusFromOutsideViewport:o,...a}=n,u=Ga(gy,s);return y.jsx(Jc,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:d=>{var m;const h=d.relatedTarget;!((m=u.viewport)!=null&&m.contains(h))&&o()}})});yc.displayName=gy;var ai="Toast",yx="toast.swipeStart",gx="toast.swipeMove",vx="toast.swipeCancel",wx="toast.swipeEnd",vy=E.forwardRef((n,t)=>{const{forceMount:s,open:o,defaultOpen:a,onOpenChange:u,...d}=n,[h,p]=ax({prop:o,defaultProp:a??!0,onChange:u,caller:ai});return y.jsx(fy,{present:s||h,children:y.jsx(bx,{open:h,...d,ref:t,onClose:()=>p(!1),onPause:ts(n.onPause),onResume:ts(n.onResume),onSwipeStart:zt(n.onSwipeStart,m=>{m.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:zt(n.onSwipeMove,m=>{const{x:v,y:w}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","move"),m.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${v}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${w}px`)}),onSwipeCancel:zt(n.onSwipeCancel,m=>{m.currentTarget.setAttribute("data-swipe","cancel"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:zt(n.onSwipeEnd,m=>{const{x:v,y:w}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","end"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${v}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${w}px`),p(!1)})})})});vy.displayName=ai;var[xx,Sx]=hy(ai,{onClose(){}}),bx=E.forwardRef((n,t)=>{const{__scopeToast:s,type:o="foreground",duration:a,open:u,onClose:d,onEscapeKeyDown:h,onPause:p,onResume:m,onSwipeStart:v,onSwipeMove:w,onSwipeCancel:_,onSwipeEnd:L,...M}=n,k=Ga(ai,s),[x,b]=E.useState(null),j=es(t,J=>b(J)),T=E.useRef(null),A=E.useRef(null),$=a||k.duration,W=E.useRef(0),G=E.useRef($),B=E.useRef(0),{onToastAdd:ie,onToastRemove:ue}=k,Se=ts(()=>{var Ee;(x==null?void 0:x.contains(document.activeElement))&&((Ee=k.viewport)==null||Ee.focus()),d()}),Te=E.useCallback(J=>{!J||J===1/0||(window.clearTimeout(B.current),W.current=new Date().getTime(),B.current=window.setTimeout(Se,J))},[Se]);E.useEffect(()=>{const J=k.viewport;if(J){const Ee=()=>{Te(G.current),m==null||m()},be=()=>{const _e=new Date().getTime()-W.current;G.current=G.current-_e,window.clearTimeout(B.current),p==null||p()};return J.addEventListener(pc,be),J.addEventListener(mc,Ee),()=>{J.removeEventListener(pc,be),J.removeEventListener(mc,Ee)}}},[k.viewport,$,p,m,Te]),E.useEffect(()=>{u&&!k.isClosePausedRef.current&&Te($)},[u,$,k.isClosePausedRef,Te]),E.useEffect(()=>(ie(),()=>ue()),[ie,ue]);const xe=E.useMemo(()=>x?ky(x):null,[x]);return k.viewport?y.jsxs(y.Fragment,{children:[xe&&y.jsx(Ex,{__scopeToast:s,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:xe}),y.jsx(xx,{scope:s,onClose:Se,children:Xc.createPortal(y.jsx(ed.ItemSlot,{scope:s,children:y.jsx(ex,{asChild:!0,onEscapeKeyDown:zt(h,()=>{k.isFocusedToastEscapeKeyDownRef.current||Se(),k.isFocusedToastEscapeKeyDownRef.current=!1}),children:y.jsx(bn.li,{tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":k.swipeDirection,...M,ref:j,style:{userSelect:"none",touchAction:"none",...n.style},onKeyDown:zt(n.onKeyDown,J=>{J.key==="Escape"&&(h==null||h(J.nativeEvent),J.nativeEvent.defaultPrevented||(k.isFocusedToastEscapeKeyDownRef.current=!0,Se()))}),onPointerDown:zt(n.onPointerDown,J=>{J.button===0&&(T.current={x:J.clientX,y:J.clientY})}),onPointerMove:zt(n.onPointerMove,J=>{if(!T.current)return;const Ee=J.clientX-T.current.x,be=J.clientY-T.current.y,_e=!!A.current,K=["left","right"].includes(k.swipeDirection),ae=["left","up"].includes(k.swipeDirection)?Math.min:Math.max,F=K?ae(0,Ee):0,P=K?0:ae(0,be),U=J.pointerType==="touch"?10:2,ce={x:F,y:P},me={originalEvent:J,delta:ce};_e?(A.current=ce,Ca(gx,w,me,{discrete:!1})):Pp(ce,k.swipeDirection,U)?(A.current=ce,Ca(yx,v,me,{discrete:!1}),J.target.setPointerCapture(J.pointerId)):(Math.abs(Ee)>U||Math.abs(be)>U)&&(T.current=null)}),onPointerUp:zt(n.onPointerUp,J=>{const Ee=A.current,be=J.target;if(be.hasPointerCapture(J.pointerId)&&be.releasePointerCapture(J.pointerId),A.current=null,T.current=null,Ee){const _e=J.currentTarget,K={originalEvent:J,delta:Ee};Pp(Ee,k.swipeDirection,k.swipeThreshold)?Ca(wx,L,K,{discrete:!0}):Ca(vx,_,K,{discrete:!0}),_e.addEventListener("click",ae=>ae.preventDefault(),{once:!0})}})})})}),k.viewport)})]}):null}),Ex=n=>{const{__scopeToast:t,children:s,...o}=n,a=Ga(ai,t),[u,d]=E.useState(!1),[h,p]=E.useState(!1);return Cx(()=>d(!0)),E.useEffect(()=>{const m=window.setTimeout(()=>p(!0),1e3);return()=>window.clearTimeout(m)},[]),h?null:y.jsx(dy,{asChild:!0,children:y.jsx(Jc,{...o,children:u&&y.jsxs(y.Fragment,{children:[a.label," ",s]})})})},_x="ToastTitle",wy=E.forwardRef((n,t)=>{const{__scopeToast:s,...o}=n;return y.jsx(bn.div,{...o,ref:t})});wy.displayName=_x;var kx="ToastDescription",xy=E.forwardRef((n,t)=>{const{__scopeToast:s,...o}=n;return y.jsx(bn.div,{...o,ref:t})});xy.displayName=kx;var Sy="ToastAction",by=E.forwardRef((n,t)=>{const{altText:s,...o}=n;return s.trim()?y.jsx(_y,{altText:s,asChild:!0,children:y.jsx(td,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Sy}\`. Expected non-empty \`string\`.`),null)});by.displayName=Sy;var Ey="ToastClose",td=E.forwardRef((n,t)=>{const{__scopeToast:s,...o}=n,a=Sx(Ey,s);return y.jsx(_y,{asChild:!0,children:y.jsx(bn.button,{type:"button",...o,ref:t,onClick:zt(n.onClick,a.onClose)})})});td.displayName=Ey;var _y=E.forwardRef((n,t)=>{const{__scopeToast:s,altText:o,...a}=n;return y.jsx(bn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...a,ref:t})});function ky(n){const t=[];return Array.from(n.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),Rx(o)){const a=o.ariaHidden||o.hidden||o.style.display==="none",u=o.dataset.radixToastAnnounceExclude==="";if(!a)if(u){const d=o.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(...ky(o))}}),t}function Ca(n,t,s,{discrete:o}){const a=s.originalEvent.currentTarget,u=new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:s});t&&a.addEventListener(n,t,{once:!0}),o?iy(a,u):a.dispatchEvent(u)}var Pp=(n,t,s=0)=>{const o=Math.abs(n.x),a=Math.abs(n.y),u=o>a;return t==="left"||t==="right"?u&&o>s:!u&&a>s};function Cx(n=()=>{}){const t=ts(n);Xo(()=>{let s=0,o=0;return s=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(o)}},[t])}function Rx(n){return n.nodeType===n.ELEMENT_NODE}function Tx(n){const t=[],s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t}function Ju(n){const t=document.activeElement;return n.some(s=>s===t?!0:(s.focus(),document.activeElement!==t))}var Nx=py,Cy=yy,Ry=vy,Ty=wy,Ny=xy,Py=by,Oy=td;function Ay(n){var t,s,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var a=n.length;for(t=0;ttypeof n=="boolean"?`${n}`:n===0?"0":n,Ap=Ly,Px=(n,t)=>s=>{var o;if((t==null?void 0:t.variants)==null)return Ap(n,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:a,defaultVariants:u}=t,d=Object.keys(a).map(m=>{const v=s==null?void 0:s[m],w=u==null?void 0:u[m];if(v===null)return null;const _=Op(v)||Op(w);return a[m][_]}),h=s&&Object.entries(s).reduce((m,v)=>{let[w,_]=v;return _===void 0||(m[w]=_),m},{}),p=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((m,v)=>{let{class:w,className:_,...L}=v;return Object.entries(L).every(M=>{let[k,x]=M;return Array.isArray(x)?x.includes({...u,...h}[k]):{...u,...h}[k]===x})?[...m,w,_]:m},[]);return Ap(n,d,p,s==null?void 0:s.class,s==null?void 0:s.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ox=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jy=(...n)=>n.filter((t,s,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===s).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var Ax={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Lx=E.forwardRef(({color:n="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:u,iconNode:d,...h},p)=>E.createElement("svg",{ref:p,...Ax,width:t,height:t,stroke:n,strokeWidth:o?Number(s)*24/Number(t):s,className:jy("lucide",a),...h},[...d.map(([m,v])=>E.createElement(m,v)),...Array.isArray(u)?u:[u]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ze=(n,t)=>{const s=E.forwardRef(({className:o,...a},u)=>E.createElement(Lx,{ref:u,iconNode:t,className:jy(`lucide-${Ox(n)}`,o),...a}));return s.displayName=`${n}`,s};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jx=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Ix=Ze("ArrowRight",jx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Dx=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Iy=Ze("Check",Dx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Mx=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]],zx=Ze("ClipboardCheck",Mx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fx=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Ux=Ze("Download",Fx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Bx=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]],$x=Ze("FileCheck",Bx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Wx=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],Vx=Ze("Flag",Wx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Hx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],qx=Ze("Globe",Hx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Qx=[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]],Kx=Ze("GraduationCap",Qx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Gx=[["path",{d:"M10 10V5a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1v5",key:"1p9q5i"}],["path",{d:"M14 6a6 6 0 0 1 6 6v3",key:"1hnv84"}],["path",{d:"M4 15v-3a6 6 0 0 1 6-6",key:"9ciidu"}],["rect",{x:"2",y:"15",width:"20",height:"4",rx:"1",key:"g3x8cw"}]],Xx=Ze("HardHat",Gx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Yx=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M12 5 9.04 7.96a2.17 2.17 0 0 0 0 3.08c.82.82 2.13.85 3 .07l2.07-1.9a2.82 2.82 0 0 1 3.79 0l2.96 2.66",key:"4oyue0"}],["path",{d:"m18 15-2-2",key:"60u0ii"}],["path",{d:"m15 18-2-2",key:"6p76be"}]],Jx=Ze("HeartHandshake",Yx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Zx=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],e1=Ze("House",Zx);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const t1=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],n1=Ze("Link",t1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const r1=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],s1=Ze("MessageCircle",r1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const o1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Dy=Ze("ShieldCheck",o1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const i1=[["path",{d:"m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z",key:"cpyugq"}],["path",{d:"M12 22v-3",key:"kmzjlo"}]],a1=Ze("TreePine",i1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const l1=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],u1=Ze("TrendingUp",l1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const c1=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],d1=Ze("TriangleAlert",c1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const f1=[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]],h1=Ze("UserCog",f1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const p1=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],m1=Ze("Users",p1);/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const y1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],g1=Ze("X",y1),v1=(n,t)=>{const s=new Array(n.length+t.length);for(let o=0;o({classGroupId:n,validator:t}),My=(n=new Map,t=null,s)=>({nextPart:n,validators:t,classGroupId:s}),Wa="-",Lp=[],x1="arbitrary..",S1=n=>{const t=E1(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return b1(d);const h=d.split(Wa),p=h[0]===""&&h.length>1?1:0;return zy(h,p,t)},getConflictingClassGroupIds:(d,h)=>{if(h){const p=o[d],m=s[d];return p?m?v1(m,p):p:m||Lp}return s[d]||Lp}}},zy=(n,t,s)=>{if(n.length-t===0)return s.classGroupId;const a=n[t],u=s.nextPart.get(a);if(u){const m=zy(n,t+1,u);if(m)return m}const d=s.validators;if(d===null)return;const h=t===0?n.join(Wa):n.slice(t).join(Wa),p=d.length;for(let m=0;mn.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=n.slice(1,-1),s=t.indexOf(":"),o=t.slice(0,s);return o?x1+o:void 0})(),E1=n=>{const{theme:t,classGroups:s}=n;return _1(s,t)},_1=(n,t)=>{const s=My();for(const o in n){const a=n[o];nd(a,s,o,t)}return s},nd=(n,t,s,o)=>{const a=n.length;for(let u=0;u{if(typeof n=="string"){C1(n,t,s);return}if(typeof n=="function"){R1(n,t,s,o);return}T1(n,t,s,o)},C1=(n,t,s)=>{const o=n===""?t:Fy(t,n);o.classGroupId=s},R1=(n,t,s,o)=>{if(N1(n)){nd(n(o),t,s,o);return}t.validators===null&&(t.validators=[]),t.validators.push(w1(s,n))},T1=(n,t,s,o)=>{const a=Object.entries(n),u=a.length;for(let d=0;d{let s=n;const o=t.split(Wa),a=o.length;for(let u=0;u"isThemeGetter"in n&&n.isThemeGetter===!0,P1=n=>{if(n<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),o=Object.create(null);const a=(u,d)=>{s[u]=d,t++,t>n&&(t=0,o=s,s=Object.create(null))};return{get(u){let d=s[u];if(d!==void 0)return d;if((d=o[u])!==void 0)return a(u,d),d},set(u,d){u in s?s[u]=d:a(u,d)}}},gc="!",jp=":",O1=[],Ip=(n,t,s,o,a)=>({modifiers:n,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:o,isExternal:a}),A1=n=>{const{prefix:t,experimentalParseClassName:s}=n;let o=a=>{const u=[];let d=0,h=0,p=0,m;const v=a.length;for(let k=0;kp?m-p:void 0;return Ip(u,L,_,M)};if(t){const a=t+jp,u=o;o=d=>d.startsWith(a)?u(d.slice(a.length)):Ip(O1,!1,d,void 0,!0)}if(s){const a=o;o=u=>s({className:u,parseClassName:a})}return o},L1=n=>{const t=new Map;return n.orderSensitiveModifiers.forEach((s,o)=>{t.set(s,1e6+o)}),s=>{const o=[];let a=[];for(let u=0;u0&&(a.sort(),o.push(...a),a=[]),o.push(d)):a.push(d)}return a.length>0&&(a.sort(),o.push(...a)),o}},j1=n=>({cache:P1(n.cacheSize),parseClassName:A1(n),sortModifiers:L1(n),...S1(n)}),I1=/\s+/,D1=(n,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:u}=t,d=[],h=n.trim().split(I1);let p="";for(let m=h.length-1;m>=0;m-=1){const v=h[m],{isExternal:w,modifiers:_,hasImportantModifier:L,baseClassName:M,maybePostfixModifierPosition:k}=s(v);if(w){p=v+(p.length>0?" "+p:p);continue}let x=!!k,b=o(x?M.substring(0,k):M);if(!b){if(!x){p=v+(p.length>0?" "+p:p);continue}if(b=o(M),!b){p=v+(p.length>0?" "+p:p);continue}x=!1}const j=_.length===0?"":_.length===1?_[0]:u(_).join(":"),T=L?j+gc:j,A=T+b;if(d.indexOf(A)>-1)continue;d.push(A);const $=a(b,x);for(let W=0;W<$.length;++W){const G=$[W];d.push(T+G)}p=v+(p.length>0?" "+p:p)}return p},M1=(...n)=>{let t=0,s,o,a="";for(;t{if(typeof n=="string")return n;let t,s="";for(let o=0;o{let s,o,a,u;const d=p=>{const m=t.reduce((v,w)=>w(v),n());return s=j1(m),o=s.cache.get,a=s.cache.set,u=h,h(p)},h=p=>{const m=o(p);if(m)return m;const v=D1(p,s);return a(p,v),v};return u=d,(...p)=>u(M1(...p))},F1=[],nt=n=>{const t=s=>s[n]||F1;return t.isThemeGetter=!0,t},By=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$y=/^\((?:(\w[\w-]*):)?(.+)\)$/i,U1=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,B1=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,W1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,V1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,H1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,or=n=>U1.test(n),ke=n=>!!n&&!Number.isNaN(Number(n)),ir=n=>!!n&&Number.isInteger(Number(n)),Zu=n=>n.endsWith("%")&&ke(n.slice(0,-1)),An=n=>B1.test(n),Wy=()=>!0,q1=n=>$1.test(n)&&!W1.test(n),rd=()=>!1,Q1=n=>V1.test(n),K1=n=>H1.test(n),G1=n=>!re(n)&&!se(n),X1=n=>br(n,qy,rd),re=n=>By.test(n),Mr=n=>br(n,Qy,q1),Dp=n=>br(n,sS,ke),Y1=n=>br(n,Gy,Wy),J1=n=>br(n,Ky,rd),Mp=n=>br(n,Vy,rd),Z1=n=>br(n,Hy,K1),Ra=n=>br(n,Xy,Q1),se=n=>$y.test(n),Fo=n=>os(n,Qy),eS=n=>os(n,Ky),zp=n=>os(n,Vy),tS=n=>os(n,qy),nS=n=>os(n,Hy),Ta=n=>os(n,Xy,!0),rS=n=>os(n,Gy,!0),br=(n,t,s)=>{const o=By.exec(n);return o?o[1]?t(o[1]):s(o[2]):!1},os=(n,t,s=!1)=>{const o=$y.exec(n);return o?o[1]?t(o[1]):s:!1},Vy=n=>n==="position"||n==="percentage",Hy=n=>n==="image"||n==="url",qy=n=>n==="length"||n==="size"||n==="bg-size",Qy=n=>n==="length",sS=n=>n==="number",Ky=n=>n==="family-name",Gy=n=>n==="number"||n==="weight",Xy=n=>n==="shadow",oS=()=>{const n=nt("color"),t=nt("font"),s=nt("text"),o=nt("font-weight"),a=nt("tracking"),u=nt("leading"),d=nt("breakpoint"),h=nt("container"),p=nt("spacing"),m=nt("radius"),v=nt("shadow"),w=nt("inset-shadow"),_=nt("text-shadow"),L=nt("drop-shadow"),M=nt("blur"),k=nt("perspective"),x=nt("aspect"),b=nt("ease"),j=nt("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...A(),se,re],W=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],B=()=>[se,re,p],ie=()=>[or,"full","auto",...B()],ue=()=>[ir,"none","subgrid",se,re],Se=()=>["auto",{span:["full",ir,se,re]},ir,se,re],Te=()=>[ir,"auto",se,re],xe=()=>["auto","min","max","fr",se,re],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Ee=()=>["start","end","center","stretch","center-safe","end-safe"],be=()=>["auto",...B()],_e=()=>[or,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...B()],K=()=>[or,"screen","full","dvw","lvw","svw","min","max","fit",...B()],ae=()=>[or,"screen","full","lh","dvh","lvh","svh","min","max","fit",...B()],F=()=>[n,se,re],P=()=>[...A(),zp,Mp,{position:[se,re]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ce=()=>["auto","cover","contain",tS,X1,{size:[se,re]}],me=()=>[Zu,Fo,Mr],he=()=>["","none","full",m,se,re],X=()=>["",ke,Fo,Mr],ve=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[ke,Zu,zp,Mp],rt=()=>["","none",M,se,re],Ft=()=>["none",ke,se,re],lt=()=>["none",ke,se,re],Yt=()=>[ke,se,re],Ut=()=>[or,"full",...B()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[An],breakpoint:[An],color:[Wy],container:[An],"drop-shadow":[An],ease:["in","out","in-out"],font:[G1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[An],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[An],shadow:[An],spacing:["px",ke],text:[An],"text-shadow":[An],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",or,re,se,x]}],container:["container"],columns:[{columns:[ke,re,se,h]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:$()}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{"inset-s":ie(),start:ie()}],end:[{"inset-e":ie(),end:ie()}],"inset-bs":[{"inset-bs":ie()}],"inset-be":[{"inset-be":ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[ir,"auto",se,re]}],basis:[{basis:[or,"full","auto",h,...B()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,or,"auto","initial","none",re]}],grow:[{grow:["",ke,se,re]}],shrink:[{shrink:["",ke,se,re]}],order:[{order:[ir,"first","last","none",se,re]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:Se()}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:Se()}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":xe()}],"auto-rows":[{"auto-rows":xe()}],gap:[{gap:B()}],"gap-x":[{"gap-x":B()}],"gap-y":[{"gap-y":B()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...Ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...Ee()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...Ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...Ee(),"baseline"]}],"place-self":[{"place-self":["auto",...Ee()]}],p:[{p:B()}],px:[{px:B()}],py:[{py:B()}],ps:[{ps:B()}],pe:[{pe:B()}],pbs:[{pbs:B()}],pbe:[{pbe:B()}],pt:[{pt:B()}],pr:[{pr:B()}],pb:[{pb:B()}],pl:[{pl:B()}],m:[{m:be()}],mx:[{mx:be()}],my:[{my:be()}],ms:[{ms:be()}],me:[{me:be()}],mbs:[{mbs:be()}],mbe:[{mbe:be()}],mt:[{mt:be()}],mr:[{mr:be()}],mb:[{mb:be()}],ml:[{ml:be()}],"space-x":[{"space-x":B()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":B()}],"space-y-reverse":["space-y-reverse"],size:[{size:_e()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[h,"screen",..._e()]}],"min-w":[{"min-w":[h,"screen","none",..._e()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[d]},..._e()]}],h:[{h:["screen","lh",..._e()]}],"min-h":[{"min-h":["screen","lh","none",..._e()]}],"max-h":[{"max-h":["screen","lh",..._e()]}],"font-size":[{text:["base",s,Fo,Mr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,rS,Y1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zu,re]}],"font-family":[{font:[eS,J1,t]}],"font-features":[{"font-features":[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,se,re]}],"line-clamp":[{"line-clamp":[ke,"none",se,Dp]}],leading:[{leading:[u,...B()]}],"list-image":[{"list-image":["none",se,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",se,Mr]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[ke,"auto",se,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:B()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ir,se,re],radial:["",se,re],conic:[ir,se,re]},nS,Z1]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-bs":[{"border-bs":X()}],"border-w-be":[{"border-be":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,se,re]}],"outline-w":[{outline:["",ke,Fo,Mr]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",v,Ta,Ra]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",w,Ta,Ra]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[ke,Mr]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",_,Ta,Ra]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[ke,se,re]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[se,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,re]}],filter:[{filter:["","none",se,re]}],blur:[{blur:rt()}],brightness:[{brightness:[ke,se,re]}],contrast:[{contrast:[ke,se,re]}],"drop-shadow":[{"drop-shadow":["","none",L,Ta,Ra]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",ke,se,re]}],"hue-rotate":[{"hue-rotate":[ke,se,re]}],invert:[{invert:["",ke,se,re]}],saturate:[{saturate:[ke,se,re]}],sepia:[{sepia:["",ke,se,re]}],"backdrop-filter":[{"backdrop-filter":["","none",se,re]}],"backdrop-blur":[{"backdrop-blur":rt()}],"backdrop-brightness":[{"backdrop-brightness":[ke,se,re]}],"backdrop-contrast":[{"backdrop-contrast":[ke,se,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,se,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,se,re]}],"backdrop-invert":[{"backdrop-invert":["",ke,se,re]}],"backdrop-opacity":[{"backdrop-opacity":[ke,se,re]}],"backdrop-saturate":[{"backdrop-saturate":[ke,se,re]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,se,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":B()}],"border-spacing-x":[{"border-spacing-x":B()}],"border-spacing-y":[{"border-spacing-y":B()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",se,re]}],ease:[{ease:["linear","initial",b,se,re]}],delay:[{delay:[ke,se,re]}],animate:[{animate:["none",j,se,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,se,re]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:Ft()}],"rotate-x":[{"rotate-x":Ft()}],"rotate-y":[{"rotate-y":Ft()}],"rotate-z":[{"rotate-z":Ft()}],scale:[{scale:lt()}],"scale-x":[{"scale-x":lt()}],"scale-y":[{"scale-y":lt()}],"scale-z":[{"scale-z":lt()}],"scale-3d":["scale-3d"],skew:[{skew:Yt()}],"skew-x":[{"skew-x":Yt()}],"skew-y":[{"skew-y":Yt()}],transform:[{transform:[se,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ut()}],"translate-x":[{"translate-x":Ut()}],"translate-y":[{"translate-y":Ut()}],"translate-z":[{"translate-z":Ut()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":B()}],"scroll-mx":[{"scroll-mx":B()}],"scroll-my":[{"scroll-my":B()}],"scroll-ms":[{"scroll-ms":B()}],"scroll-me":[{"scroll-me":B()}],"scroll-mbs":[{"scroll-mbs":B()}],"scroll-mbe":[{"scroll-mbe":B()}],"scroll-mt":[{"scroll-mt":B()}],"scroll-mr":[{"scroll-mr":B()}],"scroll-mb":[{"scroll-mb":B()}],"scroll-ml":[{"scroll-ml":B()}],"scroll-p":[{"scroll-p":B()}],"scroll-px":[{"scroll-px":B()}],"scroll-py":[{"scroll-py":B()}],"scroll-ps":[{"scroll-ps":B()}],"scroll-pe":[{"scroll-pe":B()}],"scroll-pbs":[{"scroll-pbs":B()}],"scroll-pbe":[{"scroll-pbe":B()}],"scroll-pt":[{"scroll-pt":B()}],"scroll-pr":[{"scroll-pr":B()}],"scroll-pb":[{"scroll-pb":B()}],"scroll-pl":[{"scroll-pl":B()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,re]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[ke,Fo,Mr,Dp]}],stroke:[{stroke:["none",...F()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},iS=z1(oS);function Er(...n){return iS(Ly(n))}const aS=Nx,Yy=E.forwardRef(({className:n,...t},s)=>y.jsx(Cy,{ref:s,className:Er("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",n),...t}));Yy.displayName=Cy.displayName;const lS=Px("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Jy=E.forwardRef(({className:n,variant:t,...s},o)=>y.jsx(Ry,{ref:o,className:Er(lS({variant:t}),n),...s}));Jy.displayName=Ry.displayName;const uS=E.forwardRef(({className:n,...t},s)=>y.jsx(Py,{ref:s,className:Er("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",n),...t}));uS.displayName=Py.displayName;const Zy=E.forwardRef(({className:n,...t},s)=>y.jsx(Oy,{ref:s,className:Er("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",n),"toast-close":"",...t,children:y.jsx(g1,{className:"h-4 w-4"})}));Zy.displayName=Oy.displayName;const eg=E.forwardRef(({className:n,...t},s)=>y.jsx(Ty,{ref:s,className:Er("text-sm font-semibold",n),...t}));eg.displayName=Ty.displayName;const tg=E.forwardRef(({className:n,...t},s)=>y.jsx(Ny,{ref:s,className:Er("text-sm opacity-90",n),...t}));tg.displayName=Ny.displayName;function cS(){const{toasts:n}=Ow();return y.jsxs(aS,{children:[n.map(function({id:t,title:s,description:o,action:a,...u}){return y.jsxs(Jy,{...u,children:[y.jsxs("div",{className:"grid gap-1",children:[s&&y.jsx(eg,{children:s}),o&&y.jsx(tg,{children:o})]}),a,y.jsx(Zy,{})]},t)}),y.jsx(Yy,{})]})}var li=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},dS={setTimeout:(n,t)=>setTimeout(n,t),clearTimeout:n=>clearTimeout(n),setInterval:(n,t)=>setInterval(n,t),clearInterval:n=>clearInterval(n)},ur,Qc,qm,fS=(qm=class{constructor(){pe(this,ur,dS);pe(this,Qc,!1)}setTimeoutProvider(n){ee(this,ur,n)}setTimeout(n,t){return R(this,ur).setTimeout(n,t)}clearTimeout(n){R(this,ur).clearTimeout(n)}setInterval(n,t){return R(this,ur).setInterval(n,t)}clearInterval(n){R(this,ur).clearInterval(n)}},ur=new WeakMap,Qc=new WeakMap,qm),Ur=new fS;function hS(n){setTimeout(n,0)}var ns=typeof window>"u"||"Deno"in globalThis;function At(){}function pS(n,t){return typeof n=="function"?n(t):n}function vc(n){return typeof n=="number"&&n>=0&&n!==1/0}function ng(n,t){return Math.max(n+(t||0)-Date.now(),0)}function vr(n,t){return typeof n=="function"?n(t):n}function Gt(n,t){return typeof n=="function"?n(t):n}function Fp(n,t){const{type:s="all",exact:o,fetchStatus:a,predicate:u,queryKey:d,stale:h}=n;if(d){if(o){if(t.queryHash!==sd(d,t.options))return!1}else if(!Jo(t.queryKey,d))return!1}if(s!=="all"){const p=t.isActive();if(s==="active"&&!p||s==="inactive"&&p)return!1}return!(typeof h=="boolean"&&t.isStale()!==h||a&&a!==t.state.fetchStatus||u&&!u(t))}function Up(n,t){const{exact:s,status:o,predicate:a,mutationKey:u}=n;if(u){if(!t.options.mutationKey)return!1;if(s){if(Yo(t.options.mutationKey)!==Yo(u))return!1}else if(!Jo(t.options.mutationKey,u))return!1}return!(o&&t.state.status!==o||a&&!a(t))}function sd(n,t){return((t==null?void 0:t.queryKeyHashFn)||Yo)(n)}function Yo(n){return JSON.stringify(n,(t,s)=>xc(s)?Object.keys(s).sort().reduce((o,a)=>(o[a]=s[a],o),{}):s)}function Jo(n,t){return n===t?!0:typeof n!=typeof t?!1:n&&t&&typeof n=="object"&&typeof t=="object"?Object.keys(t).every(s=>Jo(n[s],t[s])):!1}var mS=Object.prototype.hasOwnProperty;function rg(n,t,s=0){if(n===t)return n;if(s>500)return t;const o=Bp(n)&&Bp(t);if(!o&&!(xc(n)&&xc(t)))return t;const u=(o?n:Object.keys(n)).length,d=o?t:Object.keys(t),h=d.length,p=o?new Array(h):{};let m=0;for(let v=0;v{Ur.setTimeout(t,n)})}function Sc(n,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,t):s.structuralSharing!==!1?rg(n,t):t}function gS(n,t,s=0){const o=[...n,t];return s&&o.length>s?o.slice(1):o}function vS(n,t,s=0){const o=[t,...n];return s&&o.length>s?o.slice(0,-1):o}var od=Symbol();function sg(n,t){return!n.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!n.queryFn||n.queryFn===od?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function og(n,t){return typeof n=="function"?n(...t):!!n}function wS(n,t,s){let o=!1,a;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(a??(a=t()),o||(o=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),n}var Wr,cr,js,Qm,xS=(Qm=class extends li{constructor(){super();pe(this,Wr);pe(this,cr);pe(this,js);ee(this,js,t=>{if(!ns&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){R(this,cr)||this.setEventListener(R(this,js))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,cr))==null||t.call(this),ee(this,cr,void 0))}setEventListener(t){var s;ee(this,js,t),(s=R(this,cr))==null||s.call(this),ee(this,cr,t(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(t){R(this,Wr)!==t&&(ee(this,Wr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof R(this,Wr)=="boolean"?R(this,Wr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Wr=new WeakMap,cr=new WeakMap,js=new WeakMap,Qm),id=new xS;function bc(){let n,t;const s=new Promise((a,u)=>{n=a,t=u});s.status="pending",s.catch(()=>{});function o(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{o({status:"fulfilled",value:a}),n(a)},s.reject=a=>{o({status:"rejected",reason:a}),t(a)},s}var SS=hS;function bS(){let n=[],t=0,s=h=>{h()},o=h=>{h()},a=SS;const u=h=>{t?n.push(h):a(()=>{s(h)})},d=()=>{const h=n;n=[],h.length&&a(()=>{o(()=>{h.forEach(p=>{s(p)})})})};return{batch:h=>{let p;t++;try{p=h()}finally{t--,t||d()}return p},batchCalls:h=>(...p)=>{u(()=>{h(...p)})},schedule:u,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{o=h},setScheduler:h=>{a=h}}}var ht=bS(),Is,dr,Ds,Km,ES=(Km=class extends li{constructor(){super();pe(this,Is,!0);pe(this,dr);pe(this,Ds);ee(this,Ds,t=>{if(!ns&&window.addEventListener){const s=()=>t(!0),o=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",o)}}})}onSubscribe(){R(this,dr)||this.setEventListener(R(this,Ds))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,dr))==null||t.call(this),ee(this,dr,void 0))}setEventListener(t){var s;ee(this,Ds,t),(s=R(this,dr))==null||s.call(this),ee(this,dr,t(this.setOnline.bind(this)))}setOnline(t){R(this,Is)!==t&&(ee(this,Is,t),this.listeners.forEach(o=>{o(t)}))}isOnline(){return R(this,Is)}},Is=new WeakMap,dr=new WeakMap,Ds=new WeakMap,Km),Va=new ES;function _S(n){return Math.min(1e3*2**n,3e4)}function ig(n){return(n??"online")==="online"?Va.isOnline():!0}var Ec=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function ag(n){let t=!1,s=0,o;const a=bc(),u=()=>a.status!=="pending",d=k=>{var x;if(!u()){const b=new Ec(k);_(b),(x=n.onCancel)==null||x.call(n,b)}},h=()=>{t=!0},p=()=>{t=!1},m=()=>id.isFocused()&&(n.networkMode==="always"||Va.isOnline())&&n.canRun(),v=()=>ig(n.networkMode)&&n.canRun(),w=k=>{u()||(o==null||o(),a.resolve(k))},_=k=>{u()||(o==null||o(),a.reject(k))},L=()=>new Promise(k=>{var x;o=b=>{(u()||m())&&k(b)},(x=n.onPause)==null||x.call(n)}).then(()=>{var k;o=void 0,u()||(k=n.onContinue)==null||k.call(n)}),M=()=>{if(u())return;let k;const x=s===0?n.initialPromise:void 0;try{k=x??n.fn()}catch(b){k=Promise.reject(b)}Promise.resolve(k).then(w).catch(b=>{var W;if(u())return;const j=n.retry??(ns?0:3),T=n.retryDelay??_S,A=typeof T=="function"?T(s,b):T,$=j===!0||typeof j=="number"&&sm()?void 0:L()).then(()=>{t?_(b):M()})})};return{promise:a,status:()=>a.status,cancel:d,continue:()=>(o==null||o(),a),cancelRetry:h,continueRetry:p,canStart:v,start:()=>(v()?M():L().then(M),a)}}var Vr,Gm,lg=(Gm=class{constructor(){pe(this,Vr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vc(this.gcTime)&&ee(this,Vr,Ur.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(ns?1/0:300*1e3))}clearGcTimeout(){R(this,Vr)&&(Ur.clearTimeout(R(this,Vr)),ee(this,Vr,void 0))}},Vr=new WeakMap,Gm),Hr,Ms,Kt,qr,at,ni,Qr,ln,Ln,Xm,kS=(Xm=class extends lg{constructor(t){super();pe(this,ln);pe(this,Hr);pe(this,Ms);pe(this,Kt);pe(this,qr);pe(this,at);pe(this,ni);pe(this,Qr);ee(this,Qr,!1),ee(this,ni,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,qr,t.client),ee(this,Kt,R(this,qr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,Hr,Vp(this.options)),this.state=t.state??R(this,Hr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,at))==null?void 0:t.promise}setOptions(t){if(this.options={...R(this,ni),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=Vp(this.options);s.data!==void 0&&(this.setState(Wp(s.data,s.dataUpdatedAt)),ee(this,Hr,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Kt).remove(this)}setData(t,s){const o=Sc(this.state.data,t,this.options);return Ne(this,ln,Ln).call(this,{data:o,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),o}setState(t,s){Ne(this,ln,Ln).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var o,a;const s=(o=R(this,at))==null?void 0:o.promise;return(a=R(this,at))==null||a.cancel(t),s?s.then(At).catch(At):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,Hr))}isActive(){return this.observers.some(t=>Gt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===od||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>vr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!ng(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(o=>o.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=R(this,at))==null||s.continue()}onOnline(){var s;const t=this.observers.find(o=>o.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=R(this,at))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,Kt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(R(this,at)&&(R(this,Qr)?R(this,at).cancel({revert:!0}):R(this,at).cancelRetry()),this.scheduleGc()),R(this,Kt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ne(this,ln,Ln).call(this,{type:"invalidate"})}async fetch(t,s){var p,m,v,w,_,L,M,k,x,b,j,T;if(this.state.fetchStatus!=="idle"&&((p=R(this,at))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(R(this,at))return R(this,at).continueRetry(),R(this,at).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find($=>$.options.queryFn);A&&this.setOptions(A.options)}const o=new AbortController,a=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(ee(this,Qr,!0),o.signal)})},u=()=>{const A=sg(this.options,s),W=(()=>{const G={client:R(this,qr),queryKey:this.queryKey,meta:this.meta};return a(G),G})();return ee(this,Qr,!1),this.options.persister?this.options.persister(A,W,this):A(W)},h=(()=>{const A={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:R(this,qr),state:this.state,fetchFn:u};return a(A),A})();(m=this.options.behavior)==null||m.onFetch(h,this),ee(this,Ms,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=h.fetchOptions)==null?void 0:v.meta))&&Ne(this,ln,Ln).call(this,{type:"fetch",meta:(w=h.fetchOptions)==null?void 0:w.meta}),ee(this,at,ag({initialPromise:s==null?void 0:s.initialPromise,fn:h.fetchFn,onCancel:A=>{A instanceof Ec&&A.revert&&this.setState({...R(this,Ms),fetchStatus:"idle"}),o.abort()},onFail:(A,$)=>{Ne(this,ln,Ln).call(this,{type:"failed",failureCount:A,error:$})},onPause:()=>{Ne(this,ln,Ln).call(this,{type:"pause"})},onContinue:()=>{Ne(this,ln,Ln).call(this,{type:"continue"})},retry:h.options.retry,retryDelay:h.options.retryDelay,networkMode:h.options.networkMode,canRun:()=>!0}));try{const A=await R(this,at).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(L=(_=R(this,Kt).config).onSuccess)==null||L.call(_,A,this),(k=(M=R(this,Kt).config).onSettled)==null||k.call(M,A,this.state.error,this),A}catch(A){if(A instanceof Ec){if(A.silent)return R(this,at).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Ne(this,ln,Ln).call(this,{type:"error",error:A}),(b=(x=R(this,Kt).config).onError)==null||b.call(x,A,this),(T=(j=R(this,Kt).config).onSettled)==null||T.call(j,this.state.data,A,this),A}finally{this.scheduleGc()}}},Hr=new WeakMap,Ms=new WeakMap,Kt=new WeakMap,qr=new WeakMap,at=new WeakMap,ni=new WeakMap,Qr=new WeakMap,ln=new WeakSet,Ln=function(t){const s=o=>{switch(t.type){case"failed":return{...o,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...ug(o.data,this.options),fetchMeta:t.meta??null};case"success":const a={...o,...Wp(t.data,t.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,Ms,t.manual?a:void 0),a;case"error":const u=t.error;return{...o,error:u,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...t.state}}};this.state=s(this.state),ht.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),R(this,Kt).notify({query:this,type:"updated",action:t})})},Xm);function ug(n,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ig(t.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Wp(n,t){return{data:n,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Vp(n){const t=typeof n.initialData=="function"?n.initialData():n.initialData,s=t!==void 0,o=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Ot,Pe,ri,_t,Kr,zs,In,fr,si,Fs,Us,Gr,Xr,hr,Bs,Ie,Wo,_c,kc,Cc,Rc,Tc,Nc,Pc,cg,Ym,CS=(Ym=class extends li{constructor(t,s){super();pe(this,Ie);pe(this,Ot);pe(this,Pe);pe(this,ri);pe(this,_t);pe(this,Kr);pe(this,zs);pe(this,In);pe(this,fr);pe(this,si);pe(this,Fs);pe(this,Us);pe(this,Gr);pe(this,Xr);pe(this,hr);pe(this,Bs,new Set);this.options=s,ee(this,Ot,t),ee(this,fr,null),ee(this,In,bc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,Pe).addObserver(this),Hp(R(this,Pe),this.options)?Ne(this,Ie,Wo).call(this):this.updateResult(),Ne(this,Ie,Rc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Oc(R(this,Pe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Oc(R(this,Pe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ne(this,Ie,Tc).call(this),Ne(this,Ie,Nc).call(this),R(this,Pe).removeObserver(this)}setOptions(t){const s=this.options,o=R(this,Pe);if(this.options=R(this,Ot).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Gt(this.options.enabled,R(this,Pe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ne(this,Ie,Pc).call(this),R(this,Pe).setOptions(this.options),s._defaulted&&!wc(this.options,s)&&R(this,Ot).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Pe),observer:this});const a=this.hasListeners();a&&qp(R(this,Pe),o,this.options,s)&&Ne(this,Ie,Wo).call(this),this.updateResult(),a&&(R(this,Pe)!==o||Gt(this.options.enabled,R(this,Pe))!==Gt(s.enabled,R(this,Pe))||vr(this.options.staleTime,R(this,Pe))!==vr(s.staleTime,R(this,Pe)))&&Ne(this,Ie,_c).call(this);const u=Ne(this,Ie,kc).call(this);a&&(R(this,Pe)!==o||Gt(this.options.enabled,R(this,Pe))!==Gt(s.enabled,R(this,Pe))||u!==R(this,hr))&&Ne(this,Ie,Cc).call(this,u)}getOptimisticResult(t){const s=R(this,Ot).getQueryCache().build(R(this,Ot),t),o=this.createResult(s,t);return TS(this,o)&&(ee(this,_t,o),ee(this,zs,this.options),ee(this,Kr,R(this,Pe).state)),o}getCurrentResult(){return R(this,_t)}trackResult(t,s){return new Proxy(t,{get:(o,a)=>(this.trackProp(a),s==null||s(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,In).status==="pending"&&R(this,In).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,a))})}trackProp(t){R(this,Bs).add(t)}getCurrentQuery(){return R(this,Pe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=R(this,Ot).defaultQueryOptions(t),o=R(this,Ot).getQueryCache().build(R(this,Ot),s);return o.fetch().then(()=>this.createResult(o,s))}fetch(t){return Ne(this,Ie,Wo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,_t)))}createResult(t,s){var ie;const o=R(this,Pe),a=this.options,u=R(this,_t),d=R(this,Kr),h=R(this,zs),m=t!==o?t.state:R(this,ri),{state:v}=t;let w={...v},_=!1,L;if(s._optimisticResults){const ue=this.hasListeners(),Se=!ue&&Hp(t,s),Te=ue&&qp(t,o,s,a);(Se||Te)&&(w={...w,...ug(v.data,t.options)}),s._optimisticResults==="isRestoring"&&(w.fetchStatus="idle")}let{error:M,errorUpdatedAt:k,status:x}=w;L=w.data;let b=!1;if(s.placeholderData!==void 0&&L===void 0&&x==="pending"){let ue;u!=null&&u.isPlaceholderData&&s.placeholderData===(h==null?void 0:h.placeholderData)?(ue=u.data,b=!0):ue=typeof s.placeholderData=="function"?s.placeholderData((ie=R(this,Us))==null?void 0:ie.state.data,R(this,Us)):s.placeholderData,ue!==void 0&&(x="success",L=Sc(u==null?void 0:u.data,ue,s),_=!0)}if(s.select&&L!==void 0&&!b)if(u&&L===(d==null?void 0:d.data)&&s.select===R(this,si))L=R(this,Fs);else try{ee(this,si,s.select),L=s.select(L),L=Sc(u==null?void 0:u.data,L,s),ee(this,Fs,L),ee(this,fr,null)}catch(ue){ee(this,fr,ue)}R(this,fr)&&(M=R(this,fr),L=R(this,Fs),k=Date.now(),x="error");const j=w.fetchStatus==="fetching",T=x==="pending",A=x==="error",$=T&&j,W=L!==void 0,B={status:x,fetchStatus:w.fetchStatus,isPending:T,isSuccess:x==="success",isError:A,isInitialLoading:$,isLoading:$,data:L,dataUpdatedAt:w.dataUpdatedAt,error:M,errorUpdatedAt:k,failureCount:w.fetchFailureCount,failureReason:w.fetchFailureReason,errorUpdateCount:w.errorUpdateCount,isFetched:w.dataUpdateCount>0||w.errorUpdateCount>0,isFetchedAfterMount:w.dataUpdateCount>m.dataUpdateCount||w.errorUpdateCount>m.errorUpdateCount,isFetching:j,isRefetching:j&&!T,isLoadingError:A&&!W,isPaused:w.fetchStatus==="paused",isPlaceholderData:_,isRefetchError:A&&W,isStale:ad(t,s),refetch:this.refetch,promise:R(this,In),isEnabled:Gt(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ue=B.data!==void 0,Se=B.status==="error"&&!ue,Te=Ee=>{Se?Ee.reject(B.error):ue&&Ee.resolve(B.data)},xe=()=>{const Ee=ee(this,In,B.promise=bc());Te(Ee)},J=R(this,In);switch(J.status){case"pending":t.queryHash===o.queryHash&&Te(J);break;case"fulfilled":(Se||B.data!==J.value)&&xe();break;case"rejected":(!Se||B.error!==J.reason)&&xe();break}}return B}updateResult(){const t=R(this,_t),s=this.createResult(R(this,Pe),this.options);if(ee(this,Kr,R(this,Pe).state),ee(this,zs,this.options),R(this,Kr).data!==void 0&&ee(this,Us,R(this,Pe)),wc(s,t))return;ee(this,_t,s);const o=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!R(this,Bs).size)return!0;const d=new Set(u??R(this,Bs));return this.options.throwOnError&&d.add("error"),Object.keys(R(this,_t)).some(h=>{const p=h;return R(this,_t)[p]!==t[p]&&d.has(p)})};Ne(this,Ie,cg).call(this,{listeners:o()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ne(this,Ie,Rc).call(this)}},Ot=new WeakMap,Pe=new WeakMap,ri=new WeakMap,_t=new WeakMap,Kr=new WeakMap,zs=new WeakMap,In=new WeakMap,fr=new WeakMap,si=new WeakMap,Fs=new WeakMap,Us=new WeakMap,Gr=new WeakMap,Xr=new WeakMap,hr=new WeakMap,Bs=new WeakMap,Ie=new WeakSet,Wo=function(t){Ne(this,Ie,Pc).call(this);let s=R(this,Pe).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(At)),s},_c=function(){Ne(this,Ie,Tc).call(this);const t=vr(this.options.staleTime,R(this,Pe));if(ns||R(this,_t).isStale||!vc(t))return;const o=ng(R(this,_t).dataUpdatedAt,t)+1;ee(this,Gr,Ur.setTimeout(()=>{R(this,_t).isStale||this.updateResult()},o))},kc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Pe)):this.options.refetchInterval)??!1},Cc=function(t){Ne(this,Ie,Nc).call(this),ee(this,hr,t),!(ns||Gt(this.options.enabled,R(this,Pe))===!1||!vc(R(this,hr))||R(this,hr)===0)&&ee(this,Xr,Ur.setInterval(()=>{(this.options.refetchIntervalInBackground||id.isFocused())&&Ne(this,Ie,Wo).call(this)},R(this,hr)))},Rc=function(){Ne(this,Ie,_c).call(this),Ne(this,Ie,Cc).call(this,Ne(this,Ie,kc).call(this))},Tc=function(){R(this,Gr)&&(Ur.clearTimeout(R(this,Gr)),ee(this,Gr,void 0))},Nc=function(){R(this,Xr)&&(Ur.clearInterval(R(this,Xr)),ee(this,Xr,void 0))},Pc=function(){const t=R(this,Ot).getQueryCache().build(R(this,Ot),this.options);if(t===R(this,Pe))return;const s=R(this,Pe);ee(this,Pe,t),ee(this,ri,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},cg=function(t){ht.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(R(this,_t))}),R(this,Ot).getQueryCache().notify({query:R(this,Pe),type:"observerResultsUpdated"})})},Ym);function RS(n,t){return Gt(t.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&t.retryOnMount===!1)}function Hp(n,t){return RS(n,t)||n.state.data!==void 0&&Oc(n,t,t.refetchOnMount)}function Oc(n,t,s){if(Gt(t.enabled,n)!==!1&&vr(t.staleTime,n)!=="static"){const o=typeof s=="function"?s(n):s;return o==="always"||o!==!1&&ad(n,t)}return!1}function qp(n,t,s,o){return(n!==t||Gt(o.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&ad(n,s)}function ad(n,t){return Gt(t.enabled,n)!==!1&&n.isStaleByTime(vr(t.staleTime,n))}function TS(n,t){return!wc(n.getCurrentResult(),t)}function Qp(n){return{onFetch:(t,s)=>{var v,w,_,L,M;const o=t.options,a=(_=(w=(v=t.fetchOptions)==null?void 0:v.meta)==null?void 0:w.fetchMore)==null?void 0:_.direction,u=((L=t.state.data)==null?void 0:L.pages)||[],d=((M=t.state.data)==null?void 0:M.pageParams)||[];let h={pages:[],pageParams:[]},p=0;const m=async()=>{let k=!1;const x=T=>{wS(T,()=>t.signal,()=>k=!0)},b=sg(t.options,t.fetchOptions),j=async(T,A,$)=>{if(k)return Promise.reject();if(A==null&&T.pages.length)return Promise.resolve(T);const G=(()=>{const Se={client:t.client,queryKey:t.queryKey,pageParam:A,direction:$?"backward":"forward",meta:t.options.meta};return x(Se),Se})(),B=await b(G),{maxPages:ie}=t.options,ue=$?vS:gS;return{pages:ue(T.pages,B,ie),pageParams:ue(T.pageParams,A,ie)}};if(a&&u.length){const T=a==="backward",A=T?NS:Kp,$={pages:u,pageParams:d},W=A(o,$);h=await j($,W,T)}else{const T=n??u.length;do{const A=p===0?d[0]??o.initialPageParam:Kp(o,h);if(p>0&&A==null)break;h=await j(h,A),p++}while(p{var k,x;return(x=(k=t.options).persister)==null?void 0:x.call(k,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=m}}}function Kp(n,{pages:t,pageParams:s}){const o=t.length-1;return t.length>0?n.getNextPageParam(t[o],t,s[o],s):void 0}function NS(n,{pages:t,pageParams:s}){var o;return t.length>0?(o=n.getPreviousPageParam)==null?void 0:o.call(n,t[0],t,s[0],s):void 0}var oi,gn,xt,Yr,vn,lr,Jm,PS=(Jm=class extends lg{constructor(t){super();pe(this,vn);pe(this,oi);pe(this,gn);pe(this,xt);pe(this,Yr);ee(this,oi,t.client),this.mutationId=t.mutationId,ee(this,xt,t.mutationCache),ee(this,gn,[]),this.state=t.state||OS(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,gn).includes(t)||(R(this,gn).push(t),this.clearGcTimeout(),R(this,xt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,gn,R(this,gn).filter(s=>s!==t)),this.scheduleGc(),R(this,xt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,gn).length||(this.state.status==="pending"?this.scheduleGc():R(this,xt).remove(this))}continue(){var t;return((t=R(this,Yr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var d,h,p,m,v,w,_,L,M,k,x,b,j,T,A,$,W,G;const s=()=>{Ne(this,vn,lr).call(this,{type:"continue"})},o={client:R(this,oi),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Yr,ag({fn:()=>this.options.mutationFn?this.options.mutationFn(t,o):Promise.reject(new Error("No mutationFn found")),onFail:(B,ie)=>{Ne(this,vn,lr).call(this,{type:"failed",failureCount:B,error:ie})},onPause:()=>{Ne(this,vn,lr).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,xt).canRun(this)}));const a=this.state.status==="pending",u=!R(this,Yr).canStart();try{if(a)s();else{Ne(this,vn,lr).call(this,{type:"pending",variables:t,isPaused:u}),R(this,xt).config.onMutate&&await R(this,xt).config.onMutate(t,this,o);const ie=await((h=(d=this.options).onMutate)==null?void 0:h.call(d,t,o));ie!==this.state.context&&Ne(this,vn,lr).call(this,{type:"pending",context:ie,variables:t,isPaused:u})}const B=await R(this,Yr).start();return await((m=(p=R(this,xt).config).onSuccess)==null?void 0:m.call(p,B,t,this.state.context,this,o)),await((w=(v=this.options).onSuccess)==null?void 0:w.call(v,B,t,this.state.context,o)),await((L=(_=R(this,xt).config).onSettled)==null?void 0:L.call(_,B,null,this.state.variables,this.state.context,this,o)),await((k=(M=this.options).onSettled)==null?void 0:k.call(M,B,null,t,this.state.context,o)),Ne(this,vn,lr).call(this,{type:"success",data:B}),B}catch(B){try{await((b=(x=R(this,xt).config).onError)==null?void 0:b.call(x,B,t,this.state.context,this,o))}catch(ie){Promise.reject(ie)}try{await((T=(j=this.options).onError)==null?void 0:T.call(j,B,t,this.state.context,o))}catch(ie){Promise.reject(ie)}try{await(($=(A=R(this,xt).config).onSettled)==null?void 0:$.call(A,void 0,B,this.state.variables,this.state.context,this,o))}catch(ie){Promise.reject(ie)}try{await((G=(W=this.options).onSettled)==null?void 0:G.call(W,void 0,B,t,this.state.context,o))}catch(ie){Promise.reject(ie)}throw Ne(this,vn,lr).call(this,{type:"error",error:B}),B}finally{R(this,xt).runNext(this)}}},oi=new WeakMap,gn=new WeakMap,xt=new WeakMap,Yr=new WeakMap,vn=new WeakSet,lr=function(t){const s=o=>{switch(t.type){case"failed":return{...o,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...o,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:t.error,failureCount:o.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),ht.batch(()=>{R(this,gn).forEach(o=>{o.onMutationUpdate(t)}),R(this,xt).notify({mutation:this,type:"updated",action:t})})},Jm);function OS(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Dn,un,ii,Zm,AS=(Zm=class extends li{constructor(t={}){super();pe(this,Dn);pe(this,un);pe(this,ii);this.config=t,ee(this,Dn,new Set),ee(this,un,new Map),ee(this,ii,0)}build(t,s,o){const a=new PS({client:t,mutationCache:this,mutationId:++Ea(this,ii)._,options:t.defaultMutationOptions(s),state:o});return this.add(a),a}add(t){R(this,Dn).add(t);const s=Na(t);if(typeof s=="string"){const o=R(this,un).get(s);o?o.push(t):R(this,un).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,Dn).delete(t)){const s=Na(t);if(typeof s=="string"){const o=R(this,un).get(s);if(o)if(o.length>1){const a=o.indexOf(t);a!==-1&&o.splice(a,1)}else o[0]===t&&R(this,un).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Na(t);if(typeof s=="string"){const o=R(this,un).get(s),a=o==null?void 0:o.find(u=>u.state.status==="pending");return!a||a===t}else return!0}runNext(t){var o;const s=Na(t);if(typeof s=="string"){const a=(o=R(this,un).get(s))==null?void 0:o.find(u=>u!==t&&u.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ht.batch(()=>{R(this,Dn).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,Dn).clear(),R(this,un).clear()})}getAll(){return Array.from(R(this,Dn))}find(t){const s={exact:!0,...t};return this.getAll().find(o=>Up(s,o))}findAll(t={}){return this.getAll().filter(s=>Up(t,s))}notify(t){ht.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return ht.batch(()=>Promise.all(t.map(s=>s.continue().catch(At))))}},Dn=new WeakMap,un=new WeakMap,ii=new WeakMap,Zm);function Na(n){var t;return(t=n.options.scope)==null?void 0:t.id}var wn,ey,LS=(ey=class extends li{constructor(t={}){super();pe(this,wn);this.config=t,ee(this,wn,new Map)}build(t,s,o){const a=s.queryKey,u=s.queryHash??sd(a,s);let d=this.get(u);return d||(d=new kS({client:t,queryKey:a,queryHash:u,options:t.defaultQueryOptions(s),state:o,defaultOptions:t.getQueryDefaults(a)}),this.add(d)),d}add(t){R(this,wn).has(t.queryHash)||(R(this,wn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=R(this,wn).get(t.queryHash);s&&(t.destroy(),s===t&&R(this,wn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,wn).get(t)}getAll(){return[...R(this,wn).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(o=>Fp(s,o))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(o=>Fp(t,o)):s}notify(t){ht.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},wn=new WeakMap,ey),qe,pr,mr,$s,Ws,yr,Vs,Hs,ty,jS=(ty=class{constructor(n={}){pe(this,qe);pe(this,pr);pe(this,mr);pe(this,$s);pe(this,Ws);pe(this,yr);pe(this,Vs);pe(this,Hs);ee(this,qe,n.queryCache||new LS),ee(this,pr,n.mutationCache||new AS),ee(this,mr,n.defaultOptions||{}),ee(this,$s,new Map),ee(this,Ws,new Map),ee(this,yr,0)}mount(){Ea(this,yr)._++,R(this,yr)===1&&(ee(this,Vs,id.subscribe(async n=>{n&&(await this.resumePausedMutations(),R(this,qe).onFocus())})),ee(this,Hs,Va.subscribe(async n=>{n&&(await this.resumePausedMutations(),R(this,qe).onOnline())})))}unmount(){var n,t;Ea(this,yr)._--,R(this,yr)===0&&((n=R(this,Vs))==null||n.call(this),ee(this,Vs,void 0),(t=R(this,Hs))==null||t.call(this),ee(this,Hs,void 0))}isFetching(n){return R(this,qe).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return R(this,pr).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const t=this.defaultQueryOptions({queryKey:n});return(s=R(this,qe).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const t=this.defaultQueryOptions(n),s=R(this,qe).build(this,t),o=s.state.data;return o===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(vr(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(n){return R(this,qe).findAll(n).map(({queryKey:t,state:s})=>{const o=s.data;return[t,o]})}setQueryData(n,t,s){const o=this.defaultQueryOptions({queryKey:n}),a=R(this,qe).get(o.queryHash),u=a==null?void 0:a.state.data,d=pS(t,u);if(d!==void 0)return R(this,qe).build(this,o).setData(d,{...s,manual:!0})}setQueriesData(n,t,s){return ht.batch(()=>R(this,qe).findAll(n).map(({queryKey:o})=>[o,this.setQueryData(o,t,s)]))}getQueryState(n){var s;const t=this.defaultQueryOptions({queryKey:n});return(s=R(this,qe).get(t.queryHash))==null?void 0:s.state}removeQueries(n){const t=R(this,qe);ht.batch(()=>{t.findAll(n).forEach(s=>{t.remove(s)})})}resetQueries(n,t){const s=R(this,qe);return ht.batch(()=>(s.findAll(n).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...n},t)))}cancelQueries(n,t={}){const s={revert:!0,...t},o=ht.batch(()=>R(this,qe).findAll(n).map(a=>a.cancel(s)));return Promise.all(o).then(At).catch(At)}invalidateQueries(n,t={}){return ht.batch(()=>(R(this,qe).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},t)))}refetchQueries(n,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},o=ht.batch(()=>R(this,qe).findAll(n).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let u=a.fetch(void 0,s);return s.throwOnError||(u=u.catch(At)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(At)}fetchQuery(n){const t=this.defaultQueryOptions(n);t.retry===void 0&&(t.retry=!1);const s=R(this,qe).build(this,t);return s.isStaleByTime(vr(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(At).catch(At)}fetchInfiniteQuery(n){return n.behavior=Qp(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(At).catch(At)}ensureInfiniteQueryData(n){return n.behavior=Qp(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Va.isOnline()?R(this,pr).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,qe)}getMutationCache(){return R(this,pr)}getDefaultOptions(){return R(this,mr)}setDefaultOptions(n){ee(this,mr,n)}setQueryDefaults(n,t){R(this,$s).set(Yo(n),{queryKey:n,defaultOptions:t})}getQueryDefaults(n){const t=[...R(this,$s).values()],s={};return t.forEach(o=>{Jo(n,o.queryKey)&&Object.assign(s,o.defaultOptions)}),s}setMutationDefaults(n,t){R(this,Ws).set(Yo(n),{mutationKey:n,defaultOptions:t})}getMutationDefaults(n){const t=[...R(this,Ws).values()],s={};return t.forEach(o=>{Jo(n,o.mutationKey)&&Object.assign(s,o.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const t={...R(this,mr).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return t.queryHash||(t.queryHash=sd(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===od&&(t.enabled=!1),t}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...R(this,mr).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){R(this,qe).clear(),R(this,pr).clear()}},qe=new WeakMap,pr=new WeakMap,mr=new WeakMap,$s=new WeakMap,Ws=new WeakMap,yr=new WeakMap,Vs=new WeakMap,Hs=new WeakMap,ty),dg=E.createContext(void 0),IS=n=>{const t=E.useContext(dg);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},DS=({client:n,children:t})=>(E.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),y.jsx(dg.Provider,{value:n,children:t})),fg=E.createContext(!1),MS=()=>E.useContext(fg);fg.Provider;function zS(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var FS=E.createContext(zS()),US=()=>E.useContext(FS),BS=(n,t,s)=>{const o=s!=null&&s.state.error&&typeof n.throwOnError=="function"?og(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||o)&&(t.isReset()||(n.retryOnMount=!1))},$S=n=>{E.useEffect(()=>{n.clearReset()},[n])},WS=({result:n,errorResetBoundary:t,throwOnError:s,query:o,suspense:a})=>n.isError&&!t.isReset()&&!n.isFetching&&o&&(a&&n.data===void 0||og(s,[n.error,o])),VS=n=>{if(n.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),o=n.staleTime;n.staleTime=typeof o=="function"?(...a)=>s(o(...a)):s(o),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},HS=(n,t)=>n.isLoading&&n.isFetching&&!t,qS=(n,t)=>(n==null?void 0:n.suspense)&&t.isPending,Gp=(n,t,s)=>t.fetchOptimistic(n).catch(()=>{s.clearReset()});function QS(n,t,s){var _,L,M,k;const o=MS(),a=US(),u=IS(),d=u.defaultQueryOptions(n);(L=(_=u.getDefaultOptions().queries)==null?void 0:_._experimental_beforeQuery)==null||L.call(_,d);const h=u.getQueryCache().get(d.queryHash);d._optimisticResults=o?"isRestoring":"optimistic",VS(d),BS(d,a,h),$S(a);const p=!u.getQueryCache().get(d.queryHash),[m]=E.useState(()=>new t(u,d)),v=m.getOptimisticResult(d),w=!o&&n.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(x=>{const b=w?m.subscribe(ht.batchCalls(x)):At;return m.updateResult(),b},[m,w]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),E.useEffect(()=>{m.setOptions(d)},[d,m]),qS(d,v))throw Gp(d,m,a);if(WS({result:v,errorResetBoundary:a,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw v.error;if((k=(M=u.getDefaultOptions().queries)==null?void 0:M._experimental_afterQuery)==null||k.call(M,d,v),d.experimental_prefetchInRender&&!ns&&HS(v,o)){const x=p?Gp(d,m,a):h==null?void 0:h.promise;x==null||x.catch(At).finally(()=>{m.updateResult()})}return d.notifyOnChangeProps?v:m.trackResult(v)}function KS(n,t){return QS(n,CS)}const GS=new jS({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Zo(){return Zo=Object.assign?Object.assign.bind():function(n){for(var t=1;t"u")throw new Error(t)}function ld(n,t){if(!n){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function YS(){return Math.random().toString(36).substr(2,8)}function Yp(n,t){return{usr:n.state,key:n.key,idx:t}}function Ac(n,t,s,o){return s===void 0&&(s=null),Zo({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof t=="string"?Ks(t):t,{state:s,key:t&&t.key||o||YS()})}function Ha(n){let{pathname:t="/",search:s="",hash:o=""}=n;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),o&&o!=="#"&&(t+=o.charAt(0)==="#"?o:"#"+o),t}function Ks(n){let t={};if(n){let s=n.indexOf("#");s>=0&&(t.hash=n.substr(s),n=n.substr(0,s));let o=n.indexOf("?");o>=0&&(t.search=n.substr(o),n=n.substr(0,o)),n&&(t.pathname=n)}return t}function JS(n,t,s,o){o===void 0&&(o={});let{window:a=document.defaultView,v5Compat:u=!1}=o,d=a.history,h=gr.Pop,p=null,m=v();m==null&&(m=0,d.replaceState(Zo({},d.state,{idx:m}),""));function v(){return(d.state||{idx:null}).idx}function w(){h=gr.Pop;let x=v(),b=x==null?null:x-m;m=x,p&&p({action:h,location:k.location,delta:b})}function _(x,b){h=gr.Push;let j=Ac(k.location,x,b);m=v()+1;let T=Yp(j,m),A=k.createHref(j);try{d.pushState(T,"",A)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;a.location.assign(A)}u&&p&&p({action:h,location:k.location,delta:1})}function L(x,b){h=gr.Replace;let j=Ac(k.location,x,b);m=v();let T=Yp(j,m),A=k.createHref(j);d.replaceState(T,"",A),u&&p&&p({action:h,location:k.location,delta:0})}function M(x){let b=a.location.origin!=="null"?a.location.origin:a.location.href,j=typeof x=="string"?x:Ha(x);return j=j.replace(/ $/,"%20"),Je(b,"No window.location.(origin|href) available to create URL for href: "+j),new URL(j,b)}let k={get action(){return h},get location(){return n(a,d)},listen(x){if(p)throw new Error("A history only accepts one active listener");return a.addEventListener(Xp,w),p=x,()=>{a.removeEventListener(Xp,w),p=null}},createHref(x){return t(a,x)},createURL:M,encodeLocation(x){let b=M(x);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:_,replace:L,go(x){return d.go(x)}};return k}var Jp;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Jp||(Jp={}));function ZS(n,t,s){return s===void 0&&(s="/"),eb(n,t,s)}function eb(n,t,s,o){let a=typeof t=="string"?Ks(t):t,u=ud(a.pathname||"/",s);if(u==null)return null;let d=hg(n);tb(d);let h=null,p=hb(u);for(let m=0;h==null&&m{let p={relativePath:h===void 0?u.path||"":h,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};p.relativePath.startsWith("/")&&(Je(p.relativePath.startsWith(o),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(o.length));let m=wr([o,p.relativePath]),v=s.concat(p);u.children&&u.children.length>0&&(Je(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),hg(u.children,t,v,m)),!(u.path==null&&!u.index)&&t.push({path:m,score:lb(m,u.index),routesMeta:v})};return n.forEach((u,d)=>{var h;if(u.path===""||!((h=u.path)!=null&&h.includes("?")))a(u,d);else for(let p of pg(u.path))a(u,d,p)}),t}function pg(n){let t=n.split("/");if(t.length===0)return[];let[s,...o]=t,a=s.endsWith("?"),u=s.replace(/\?$/,"");if(o.length===0)return a?[u,""]:[u];let d=pg(o.join("/")),h=[];return h.push(...d.map(p=>p===""?u:[u,p].join("/"))),a&&h.push(...d),h.map(p=>n.startsWith("/")&&p===""?"/":p)}function tb(n){n.sort((t,s)=>t.score!==s.score?s.score-t.score:ub(t.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}const nb=/^:[\w-]+$/,rb=3,sb=2,ob=1,ib=10,ab=-2,Zp=n=>n==="*";function lb(n,t){let s=n.split("/"),o=s.length;return s.some(Zp)&&(o+=ab),t&&(o+=sb),s.filter(a=>!Zp(a)).reduce((a,u)=>a+(nb.test(u)?rb:u===""?ob:ib),o)}function ub(n,t){return n.length===t.length&&n.slice(0,-1).every((o,a)=>o===t[a])?n[n.length-1]-t[t.length-1]:0}function cb(n,t,s){let{routesMeta:o}=n,a={},u="/",d=[];for(let h=0;h{let{paramName:_,isOptional:L}=v;if(_==="*"){let k=h[w]||"";d=u.slice(0,u.length-k.length).replace(/(.)\/+$/,"$1")}const M=h[w];return L&&!M?m[_]=void 0:m[_]=(M||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:d,pattern:n}}function fb(n,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),ld(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let o=[],a="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,h,p)=>(o.push({paramName:h,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(o.push({paramName:"*"}),a+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?a+="\\/*$":n!==""&&n!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),o]}function hb(n){try{return n.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ld(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),n}}function ud(n,t){if(t==="/")return n;if(!n.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,o=n.charAt(s);return o&&o!=="/"?null:n.slice(s)||"/"}const pb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mb=n=>pb.test(n);function yb(n,t){t===void 0&&(t="/");let{pathname:s,search:o="",hash:a=""}=typeof n=="string"?Ks(n):n,u;if(s)if(mb(s))u=s;else{if(s.includes("//")){let d=s;s=gg(s),ld(!1,"Pathnames cannot have embedded double slashes - normalizing "+(d+" -> "+s))}s.startsWith("/")?u=em(s.substring(1),"/"):u=em(s,t)}else u=t;return{pathname:u,search:wb(o),hash:xb(a)}}function em(n,t){let s=t.replace(/\/+$/,"").split("/");return n.split("/").forEach(a=>{a===".."?s.length>1&&s.pop():a!=="."&&s.push(a)}),s.length>1?s.join("/"):"/"}function ec(n,t,s,o){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function gb(n){return n.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function mg(n,t){let s=gb(n);return t?s.map((o,a)=>a===s.length-1?o.pathname:o.pathnameBase):s.map(o=>o.pathnameBase)}function yg(n,t,s,o){o===void 0&&(o=!1);let a;typeof n=="string"?a=Ks(n):(a=Zo({},n),Je(!a.pathname||!a.pathname.includes("?"),ec("?","pathname","search",a)),Je(!a.pathname||!a.pathname.includes("#"),ec("#","pathname","hash",a)),Je(!a.search||!a.search.includes("#"),ec("#","search","hash",a)));let u=n===""||a.pathname==="",d=u?"/":a.pathname,h;if(d==null)h=s;else{let w=t.length-1;if(!o&&d.startsWith("..")){let _=d.split("/");for(;_[0]==="..";)_.shift(),w-=1;a.pathname=_.join("/")}h=w>=0?t[w]:"/"}let p=yb(a,h),m=d&&d!=="/"&&d.endsWith("/"),v=(u||d===".")&&s.endsWith("/");return!p.pathname.endsWith("/")&&(m||v)&&(p.pathname+="/"),p}const gg=n=>n.replace(/\/\/+/g,"/"),wr=n=>gg(n.join("/")),vb=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),wb=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,xb=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function Sb(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const vg=["post","put","patch","delete"];new Set(vg);const bb=["get",...vg];new Set(bb);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function ei(){return ei=Object.assign?Object.assign.bind():function(n){for(var t=1;t{h.current=!0}),E.useCallback(function(m,v){if(v===void 0&&(v={}),!h.current)return;if(typeof m=="number"){o.go(m);return}let w=yg(m,JSON.parse(d),u,v.relative==="path");n==null&&t!=="/"&&(w.pathname=w.pathname==="/"?t:wr([t,w.pathname])),(v.replace?o.replace:o.push)(w,v.state,v)},[t,o,d,u,n])}function Sg(n,t){let{relative:s}=t===void 0?{}:t,{future:o}=E.useContext(is),{matches:a}=E.useContext(as),{pathname:u}=Gs(),d=JSON.stringify(mg(a,o.v7_relativeSplatPath));return E.useMemo(()=>yg(n,JSON.parse(d),u,s==="path"),[n,d,u,s])}function Tb(n,t){return Nb(n,t)}function Nb(n,t,s,o){ci()||Je(!1);let{navigator:a}=E.useContext(is),{matches:u}=E.useContext(as),d=u[u.length-1],h=d?d.params:{};d&&d.pathname;let p=d?d.pathnameBase:"/";d&&d.route;let m=Gs(),v;if(t){var w;let x=typeof t=="string"?Ks(t):t;p==="/"||(w=x.pathname)!=null&&w.startsWith(p)||Je(!1),v=x}else v=m;let _=v.pathname||"/",L=_;if(p!=="/"){let x=p.replace(/^\//,"").split("/");L="/"+_.replace(/^\//,"").split("/").slice(x.length).join("/")}let M=ZS(n,{pathname:L}),k=jb(M&&M.map(x=>Object.assign({},x,{params:Object.assign({},h,x.params),pathname:wr([p,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?p:wr([p,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),u,s,o);return t&&k?E.createElement(ui.Provider,{value:{location:ei({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:gr.Pop}},k):k}function Pb(){let n=zb(),t=Sb(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),s?E.createElement("pre",{style:a},s):null,null)}const Ob=E.createElement(Pb,null);class Ab extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?E.createElement(as.Provider,{value:this.props.routeContext},E.createElement(wg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Lb(n){let{routeContext:t,match:s,children:o}=n,a=E.useContext(cd);return a&&a.static&&a.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=s.route.id),E.createElement(as.Provider,{value:t},o)}function jb(n,t,s,o){var a;if(t===void 0&&(t=[]),s===void 0&&(s=null),o===void 0&&(o=null),n==null){var u;if(!s)return null;if(s.errors)n=s.matches;else if((u=o)!=null&&u.v7_partialHydration&&t.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let d=n,h=(a=s)==null?void 0:a.errors;if(h!=null){let v=d.findIndex(w=>w.route.id&&(h==null?void 0:h[w.route.id])!==void 0);v>=0||Je(!1),d=d.slice(0,Math.min(d.length,v+1))}let p=!1,m=-1;if(s&&o&&o.v7_partialHydration)for(let v=0;v=0?d=d.slice(0,m+1):d=[d[0]];break}}}return d.reduceRight((v,w,_)=>{let L,M=!1,k=null,x=null;s&&(L=h&&w.route.id?h[w.route.id]:void 0,k=w.route.errorElement||Ob,p&&(m<0&&_===0?(Ub("route-fallback"),M=!0,x=null):m===_&&(M=!0,x=w.route.hydrateFallbackElement||null)));let b=t.concat(d.slice(0,_+1)),j=()=>{let T;return L?T=k:M?T=x:w.route.Component?T=E.createElement(w.route.Component,null):w.route.element?T=w.route.element:T=v,E.createElement(Lb,{match:w,routeContext:{outlet:v,matches:b,isDataRoute:s!=null},children:T})};return s&&(w.route.ErrorBoundary||w.route.errorElement||_===0)?E.createElement(Ab,{location:s.location,revalidation:s.revalidation,component:k,error:L,children:j(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):j()},null)}var bg=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(bg||{}),Eg=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(Eg||{});function Ib(n){let t=E.useContext(cd);return t||Je(!1),t}function Db(n){let t=E.useContext(Eb);return t||Je(!1),t}function Mb(n){let t=E.useContext(as);return t||Je(!1),t}function _g(n){let t=Mb(),s=t.matches[t.matches.length-1];return s.route.id||Je(!1),s.route.id}function zb(){var n;let t=E.useContext(wg),s=Db(),o=_g();return t!==void 0?t:(n=s.errors)==null?void 0:n[o]}function Fb(){let{router:n}=Ib(bg.UseNavigateStable),t=_g(Eg.UseNavigateStable),s=E.useRef(!1);return xg(()=>{s.current=!0}),E.useCallback(function(a,u){u===void 0&&(u={}),s.current&&(typeof a=="number"?n.navigate(a):n.navigate(a,ei({fromRouteId:t},u)))},[n,t])}const tm={};function Ub(n,t,s){tm[n]||(tm[n]=!0)}function Bb(n,t){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function Lc(n){Je(!1)}function $b(n){let{basename:t="/",children:s=null,location:o,navigationType:a=gr.Pop,navigator:u,static:d=!1,future:h}=n;ci()&&Je(!1);let p=t.replace(/^\/*/,"/"),m=E.useMemo(()=>({basename:p,navigator:u,static:d,future:ei({v7_relativeSplatPath:!1},h)}),[p,h,u,d]);typeof o=="string"&&(o=Ks(o));let{pathname:v="/",search:w="",hash:_="",state:L=null,key:M="default"}=o,k=E.useMemo(()=>{let x=ud(v,p);return x==null?null:{location:{pathname:x,search:w,hash:_,state:L,key:M},navigationType:a}},[p,v,w,_,L,M,a]);return k==null?null:E.createElement(is.Provider,{value:m},E.createElement(ui.Provider,{children:s,value:k}))}function Wb(n){let{children:t,location:s}=n;return Tb(jc(t),s)}new Promise(()=>{});function jc(n,t){t===void 0&&(t=[]);let s=[];return E.Children.forEach(n,(o,a)=>{if(!E.isValidElement(o))return;let u=[...t,a];if(o.type===E.Fragment){s.push.apply(s,jc(o.props.children,u));return}o.type!==Lc&&Je(!1),!o.props.index||!o.props.children||Je(!1);let d={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=jc(o.props.children,u)),s.push(d)}),s}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Ic(){return Ic=Object.assign?Object.assign.bind():function(n){for(var t=1;t{m&&nm?nm(()=>p(w)):p(w)},[p,m]);return E.useLayoutEffect(()=>d.listen(v),[d,v]),E.useEffect(()=>Bb(o),[o]),E.createElement($b,{basename:t,children:s,location:h.location,navigationType:h.action,navigator:d,future:o})}const Yb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Jb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Br=E.forwardRef(function(t,s){let{onClick:o,relative:a,reloadDocument:u,replace:d,state:h,target:p,to:m,preventScrollReset:v,viewTransition:w}=t,_=Vb(t,Qb),{basename:L}=E.useContext(is),M,k=!1;if(typeof m=="string"&&Jb.test(m)&&(M=m,Yb))try{let T=new URL(window.location.href),A=m.startsWith("//")?new URL(T.protocol+m):new URL(m),$=ud(A.pathname,L);A.origin===T.origin&&$!=null?m=$+A.search+A.hash:k=!0}catch{}let x=_b(m,{relative:a}),b=Zb(m,{replace:d,state:h,target:p,preventScrollReset:v,relative:a,viewTransition:w});function j(T){o&&o(T),T.defaultPrevented||b(T)}return E.createElement("a",Ic({},_,{href:M||x,onClick:k||u?o:j,ref:s,target:p}))});var rm;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(rm||(rm={}));var sm;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(sm||(sm={}));function Zb(n,t){let{target:s,replace:o,state:a,preventScrollReset:u,relative:d,viewTransition:h}=t===void 0?{}:t,p=Cb(),m=Gs(),v=Sg(n,{relative:d});return E.useCallback(w=>{if(qb(w,s)){w.preventDefault();let _=o!==void 0?o:Ha(m)===Ha(v);p(n,{replace:_,state:a,preventScrollReset:u,relative:d,viewTransition:h})}},[m,p,v,o,a,s,n,u,d,h])}function kg(n,t){return function(){return n.apply(t,arguments)}}const{toString:eE}=Object.prototype,{getPrototypeOf:qs}=Object,{iterator:di,toStringTag:Cg}=Symbol,qa=(({hasOwnProperty:n})=>(t,s)=>n.call(t,s))(Object.prototype),ti=(n,t)=>{let s=n;const o=[];for(;s!=null&&s!==Object.prototype;){if(o.indexOf(s)!==-1)return!1;if(o.push(s),qa(s,t))return!0;s=qs(s)}return!1},tE=(n,t)=>n!=null&&ti(n,t)?n[t]:void 0,dd=(n=>t=>{const s=eE.call(t);return n[s]||(n[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),dn=n=>(n=n.toLowerCase(),t=>dd(t)===n),Xa=n=>t=>typeof t===n,{isArray:rs}=Array,Qs=Xa("undefined");function Xs(n){return n!==null&&!Qs(n)&&n.constructor!==null&&!Qs(n.constructor)&&Lt(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const Rg=dn("ArrayBuffer");function nE(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&Rg(n.buffer),t}const rE=Xa("string"),Lt=Xa("function"),Tg=Xa("number"),Ys=n=>n!==null&&typeof n=="object",sE=n=>n===!0||n===!1,Da=n=>{if(!Ys(n))return!1;const t=qs(n);return(t===null||t===Object.prototype||qs(t)===null)&&!ti(n,Cg)&&!ti(n,di)},oE=n=>{if(!Ys(n)||Xs(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},iE=dn("Date"),aE=dn("File"),lE=n=>!!(n&&typeof n.uri<"u"),uE=n=>n&&typeof n.getParts<"u",cE=dn("Blob"),dE=dn("FileList"),fE=n=>Ys(n)&&Lt(n.pipe);function hE(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const om=hE(),im=typeof om.FormData<"u"?om.FormData:void 0,pE=n=>{if(!n)return!1;if(im&&n instanceof im)return!0;const t=qs(n);if(!t||t===Object.prototype||!Lt(n.append))return!1;const s=dd(n);return s==="formdata"||s==="object"&&Lt(n.toString)&&n.toString()==="[object FormData]"},mE=dn("URLSearchParams"),[yE,gE,vE,wE]=["ReadableStream","Request","Response","Headers"].map(dn),xE=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fi(n,t,{allOwnKeys:s=!1}={}){if(n===null||typeof n>"u")return;let o,a;if(typeof n!="object"&&(n=[n]),rs(n))for(o=0,a=n.length;o0;)if(a=s[o],t===a.toLowerCase())return a;return null}const $r=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Pg=n=>!Qs(n)&&n!==$r;function Dc(...n){const{caseless:t,skipUndefined:s}=Pg(this)&&this||{},o={},a=(u,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=t&&typeof d=="string"&&Ng(o,d)||d,p=qa(o,h)?o[h]:void 0;Da(p)&&Da(u)?o[h]=Dc(p,u):Da(u)?o[h]=Dc({},u):rs(u)?o[h]=u.slice():(!s||!Qs(u))&&(o[h]=u)};for(let u=0,d=n.length;u(fi(t,(a,u)=>{s&&Lt(a)?Object.defineProperty(n,u,{__proto__:null,value:kg(a,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,u,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),n),bE=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),EE=(n,t,s,o)=>{n.prototype=Object.create(t.prototype,o),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),s&&Object.assign(n.prototype,s)},_E=(n,t,s,o)=>{let a,u,d;const h={};if(t=t||{},n==null)return t;do{for(a=Object.getOwnPropertyNames(n),u=a.length;u-- >0;)d=a[u],(!o||o(d,n,t))&&!h[d]&&(t[d]=n[d],h[d]=!0);n=s!==!1&&qs(n)}while(n&&(!s||s(n,t))&&n!==Object.prototype);return t},kE=(n,t,s)=>{n=String(n),(s===void 0||s>n.length)&&(s=n.length),s-=t.length;const o=n.indexOf(t,s);return o!==-1&&o===s},CE=n=>{if(!n)return null;if(rs(n))return n;let t=n.length;if(!Tg(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=n[t];return s},RE=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&qs(Uint8Array)),TE=(n,t)=>{const o=(n&&n[di]).call(n);let a;for(;(a=o.next())&&!a.done;){const u=a.value;t.call(n,u[0],u[1])}},NE=(n,t)=>{let s;const o=[];for(;(s=n.exec(t))!==null;)o.push(s);return o},PE=dn("HTMLFormElement"),OE=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,o,a){return o.toUpperCase()+a}),{propertyIsEnumerable:AE}=Object.prototype,LE=dn("RegExp"),Og=(n,t)=>{const s=Object.getOwnPropertyDescriptors(n),o={};fi(s,(a,u)=>{let d;(d=t(a,u,n))!==!1&&(o[u]=d||a)}),Object.defineProperties(n,o)},jE=n=>{Og(n,(t,s)=>{if(Lt(n)&&["arguments","caller","callee"].includes(s))return!1;const o=n[s];if(Lt(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},IE=(n,t)=>{const s={},o=a=>{a.forEach(u=>{s[u]=!0})};return rs(n)?o(n):o(String(n).split(t)),s},DE=()=>{},ME=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function zE(n){return!!(n&&Lt(n.append)&&n[Cg]==="FormData"&&n[di])}const FE=n=>{const t=new WeakSet,s=o=>{if(Ys(o)){if(t.has(o))return;if(Xs(o))return o;if(!("toJSON"in o)){t.add(o);const a=rs(o)?[]:{};return fi(o,(u,d)=>{const h=s(u);!Qs(h)&&(a[d]=h)}),t.delete(o),a}}return o};return s(n)},UE=dn("AsyncFunction"),BE=n=>n&&(Ys(n)||Lt(n))&&Lt(n.then)&&Lt(n.catch),Ag=((n,t)=>n?setImmediate:t?((s,o)=>($r.addEventListener("message",({source:a,data:u})=>{a===$r&&u===s&&o.length&&o.shift()()},!1),a=>{o.push(a),$r.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",Lt($r.postMessage)),$E=typeof queueMicrotask<"u"?queueMicrotask.bind($r):typeof process<"u"&&process.nextTick||Ag,Lg=n=>n!=null&&Lt(n[di]),WE=n=>n!=null&&ti(n,di)&&Lg(n),O={isArray:rs,isArrayBuffer:Rg,isBuffer:Xs,isFormData:pE,isArrayBufferView:nE,isString:rE,isNumber:Tg,isBoolean:sE,isObject:Ys,isPlainObject:Da,isEmptyObject:oE,isReadableStream:yE,isRequest:gE,isResponse:vE,isHeaders:wE,isUndefined:Qs,isDate:iE,isFile:aE,isReactNativeBlob:lE,isReactNative:uE,isBlob:cE,isRegExp:LE,isFunction:Lt,isStream:fE,isURLSearchParams:mE,isTypedArray:RE,isFileList:dE,forEach:fi,merge:Dc,extend:SE,trim:xE,stripBOM:bE,inherits:EE,toFlatObject:_E,kindOf:dd,kindOfTest:dn,endsWith:kE,toArray:CE,forEachEntry:TE,matchAll:NE,isHTMLForm:PE,hasOwnProperty:qa,hasOwnProp:qa,hasOwnInPrototypeChain:ti,getSafeProp:tE,reduceDescriptors:Og,freezeMethods:jE,toObjectSet:IE,toCamelCase:OE,noop:DE,toFiniteNumber:ME,findKey:Ng,global:$r,isContextDefined:Pg,isSpecCompliantForm:zE,toJSONObject:FE,isAsyncFn:UE,isThenable:BE,setImmediate:Ag,asap:$E,isIterable:Lg,isSafeIterable:WE},VE=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),HE=n=>{const t={};let s,o,a;return n&&n.split(` `).forEach(function(d){a=d.indexOf(":"),s=d.substring(0,a).trim().toLowerCase(),o=d.substring(a+1).trim(),!(!s||t[s]&&VE[s])&&(s==="set-cookie"?t[s]?t[s].push(o):t[s]=[o]:t[s]=t[s]?t[s]+", "+o:o)}),t};function qE(n){let t=0,s=n.length;for(;tt;){const o=n.charCodeAt(s-1);if(o!==9&&o!==32)break;s-=1}return t===0&&s===n.length?n:n.slice(t,s)}const QE=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),KE=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function fd(n,t){return O.isArray(n)?n.map(s=>fd(s,t)):qE(String(n).replace(t,""))}const GE=n=>fd(n,QE),XE=n=>fd(n,KE);function jg(n){const t=Object.create(null);return O.forEach(n.toJSON(),(s,o)=>{t[o]=XE(s)}),t}const am=Symbol("internals");function Uo(n){return n&&String(n).trim().toLowerCase()}function Ma(n){return n===!1||n==null?n:O.isArray(n)?n.map(Ma):GE(String(n))}function YE(n){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=s.exec(n);)t[o[1]]=o[2];return t}const JE=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function tc(n,t,s,o,a){if(O.isFunction(o))return o.call(this,t,s);if(a&&(t=s),!!O.isString(t)){if(O.isString(o))return t.indexOf(o)!==-1;if(O.isRegExp(o))return o.test(t)}}function ZE(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,s,o)=>s.toUpperCase()+o)}function e_(n,t){const s=O.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(n,o+s,{__proto__:null,value:function(a,u,d){return this[o].call(this,t,a,u,d)},configurable:!0})})}let St=class{constructor(t){t&&this.set(t)}set(t,s,o){const a=this;function u(h,p,m){const v=Uo(p);if(!v)return;const w=O.findKey(a,v);(!w||a[w]===void 0||m===!0||m===void 0&&a[w]!==!1)&&(a[w||p]=Ma(h))}const d=(h,p)=>O.forEach(h,(m,v)=>u(m,v,p));if(O.isPlainObject(t)||t instanceof this.constructor)d(t,s);else if(O.isString(t)&&(t=t.trim())&&!JE(t))d(HE(t),s);else if(O.isObject(t)&&O.isSafeIterable(t)){let h=Object.create(null),p,m;for(const v of t){if(!O.isArray(v))throw new TypeError("Object iterator must return a key-value pair");m=v[0],O.hasOwnProp(h,m)?(p=h[m],h[m]=O.isArray(p)?[...p,v[1]]:[p,v[1]]):h[m]=v[1]}d(h,s)}else t!=null&&u(s,t,o);return this}get(t,s){if(t=Uo(t),t){const o=O.findKey(this,t);if(o){const a=this[o];if(!s)return a;if(s===!0)return YE(a);if(O.isFunction(s))return s.call(this,a,o);if(O.isRegExp(s))return s.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,s){if(t=Uo(t),t){const o=O.findKey(this,t);return!!(o&&this[o]!==void 0&&(!s||tc(this,this[o],o,s)))}return!1}delete(t,s){const o=this;let a=!1;function u(d){if(d=Uo(d),d){const h=O.findKey(o,d);h&&(!s||tc(o,o[h],h,s))&&(delete o[h],a=!0)}}return O.isArray(t)?t.forEach(u):u(t),a}clear(t){const s=Object.keys(this);let o=s.length,a=!1;for(;o--;){const u=s[o];(!t||tc(this,this[u],u,t,!0))&&(delete this[u],a=!0)}return a}normalize(t){const s=this,o={};return O.forEach(this,(a,u)=>{const d=O.findKey(o,u);if(d){s[d]=Ma(a),delete s[u];return}const h=t?ZE(u):String(u).trim();h!==u&&delete s[u],s[h]=Ma(a),o[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const s=Object.create(null);return O.forEach(this,(o,a)=>{o!=null&&o!==!1&&(s[a]=t&&O.isArray(o)?o.join(", "):o)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,s])=>t+": "+s).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){const o=new this(t);return s.forEach(a=>o.set(a)),o}static accessor(t){const o=(this[am]=this[am]={accessors:{}}).accessors,a=this.prototype;function u(d){const h=Uo(d);o[h]||(e_(a,d),o[h]=!0)}return O.isArray(t)?t.forEach(u):u(t),this}};St.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(St.prototype,({value:n},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(o){this[s]=o}}});O.freezeMethods(St);const t_="[REDACTED ****]";function n_(n){if(O.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(O.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function r_(n,t){const s=new Set(t.map(u=>String(u).toLowerCase())),o=[],a=u=>{if(u===null||typeof u!="object"||O.isBuffer(u))return u;if(o.indexOf(u)!==-1)return;u instanceof St&&(u=u.toJSON()),o.push(u);let d;if(O.isArray(u))d=[],u.forEach((h,p)=>{const m=a(h);O.isUndefined(m)||(d[p]=m)});else{if(!O.isPlainObject(u)&&n_(u))return o.pop(),u;d=Object.create(null);for(const[h,p]of Object.entries(u)){const m=s.has(h.toLowerCase())?t_:a(p);O.isUndefined(m)||(d[h]=m)}}return o.pop(),d};return a(n)}let Y=class Ig extends Error{static from(t,s,o,a,u,d){const h=new Ig(t.message,s||t.code,o,a,u);return Object.defineProperty(h,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),h.name=t.name,t.status!=null&&h.status==null&&(h.status=t.status),d&&Object.assign(h,d),h}constructor(t,s,o,a,u){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),o&&(this.config=o),a&&(this.request=a),u&&(this.response=u,this.status=u.status)}toJSON(){const t=this.config,s=t&&O.hasOwnProp(t,"redact")?t.redact:void 0,o=O.isArray(s)&&s.length>0?r_(t,s):O.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};Y.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Y.ERR_BAD_OPTION="ERR_BAD_OPTION";Y.ECONNABORTED="ECONNABORTED";Y.ETIMEDOUT="ETIMEDOUT";Y.ECONNREFUSED="ECONNREFUSED";Y.ERR_NETWORK="ERR_NETWORK";Y.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Y.ERR_DEPRECATED="ERR_DEPRECATED";Y.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Y.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Y.ERR_CANCELED="ERR_CANCELED";Y.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Y.ERR_INVALID_URL="ERR_INVALID_URL";Y.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const s_=null,Dg=100;function Mc(n){return O.isPlainObject(n)||O.isArray(n)}function Mg(n){return O.endsWith(n,"[]")?n.slice(0,-2):n}function nc(n,t,s){return n?n.concat(t).map(function(a,u){return a=Mg(a),!s&&u?"["+a+"]":a}).join(s?".":""):t}function o_(n){return O.isArray(n)&&!n.some(Mc)}const i_=O.toFlatObject(O,{},null,function(t){return/^is[A-Z]/.test(t)});function Ya(n,t,s){if(!O.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,s=O.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,T){return!O.isUndefined(T[j])});const o=s.metaTokens,a=s.visitor||M,u=s.dots,d=s.indexes,h=s.Blob||typeof Blob<"u"&&Blob,p=s.maxDepth===void 0?Dg:s.maxDepth,m=h&&O.isSpecCompliantForm(t),v=[];if(!O.isFunction(a))throw new TypeError("visitor must be a function");function w(b){if(b===null)return"";if(O.isDate(b))return b.toISOString();if(O.isBoolean(b))return b.toString();if(!m&&O.isBlob(b))throw new Y("Blob is not supported. Use a Buffer instead.");if(O.isArrayBuffer(b)||O.isTypedArray(b)){if(m&&typeof h=="function")return new h([b]);if(typeof Buffer<"u")return Buffer.from(b);throw new Y("Blob is not supported. Use a Buffer instead.",Y.ERR_NOT_SUPPORT)}return b}function _(b){if(b>p)throw new Y("Object is too deeply nested ("+b+" levels). Max depth: "+p,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function L(b,j){if(p===1/0)return JSON.stringify(b);const T=[];return JSON.stringify(b,function($,W){if(!O.isObject(W))return W;for(;T.length&&T[T.length-1]!==this;)T.pop();return T.push(W),_(j+T.length-1),W})}function M(b,j,T){let A=b;if(O.isReactNative(t)&&O.isReactNativeBlob(b))return t.append(nc(T,j,u),w(b)),!1;if(b&&!T&&typeof b=="object"){if(O.endsWith(j,"{}"))j=o?j:j.slice(0,-2),b=L(b,1);else if(O.isArray(b)&&o_(b)||(O.isFileList(b)||O.endsWith(j,"[]"))&&(A=O.toArray(b)))return j=Mg(j),A.forEach(function(W,G){!(O.isUndefined(W)||W===null)&&t.append(d===!0?nc([j],G,u):d===null?j:j+"[]",w(W))}),!1}return Mc(b)?!0:(t.append(nc(T,j,u),w(b)),!1)}const k=Object.assign(i_,{defaultVisitor:M,convertValue:w,isVisitable:Mc});function x(b,j,T=0){if(!O.isUndefined(b)){if(_(T),v.indexOf(b)!==-1)throw new Error("Circular reference detected in "+j.join("."));v.push(b),O.forEach(b,function($,W){(!(O.isUndefined($)||$===null)&&a.call(t,$,O.isString(W)?W.trim():W,j,k))===!0&&x($,j?j.concat(W):[W],T+1)}),v.pop()}}if(!O.isObject(n))throw new TypeError("data must be an object");return x(n),t}function lm(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(o){return t[o]})}function hd(n,t){this._pairs=[],n&&Ya(n,this,t)}const zg=hd.prototype;zg.append=function(t,s){this._pairs.push([t,s])};zg.toString=function(t){const s=t?o=>t.call(this,o,lm):lm;return this._pairs.map(function(a){return s(a[0])+"="+s(a[1])},"").join("&")};function a_(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Fg(n,t,s){if(!t)return n;n=n||"";const o=O.isFunction(s)?{serialize:s}:s,a=O.getSafeProp(o,"encode")||a_,u=O.getSafeProp(o,"serialize");let d;if(u?d=u(t,o):d=O.isURLSearchParams(t)?t.toString():new hd(t,o).toString(a),d){const h=n.indexOf("#");h!==-1&&(n=n.slice(0,h)),n+=(n.indexOf("?")===-1?"?":"&")+d}return n}class um{constructor(){this.handlers=[]}use(t,s,o){return this.handlers.push({fulfilled:t,rejected:s,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){O.forEach(this.handlers,function(o){o!==null&&t(o)})}}const pd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},l_=typeof URLSearchParams<"u"?URLSearchParams:hd,u_=typeof FormData<"u"?FormData:null,c_=typeof Blob<"u"?Blob:null,d_={isBrowser:!0,classes:{URLSearchParams:l_,FormData:u_,Blob:c_},protocols:["http","https","file","blob","url","data"]},md=typeof window<"u"&&typeof document<"u",zc=typeof navigator=="object"&&navigator||void 0,f_=md&&(!zc||["ReactNative","NativeScript","NS"].indexOf(zc.product)<0),h_=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",p_=md&&window.location.href||"http://localhost",m_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:md,hasStandardBrowserEnv:f_,hasStandardBrowserWebWorkerEnv:h_,navigator:zc,origin:p_},Symbol.toStringTag,{value:"Module"})),pt={...m_,...d_};function y_(n,t){return Ya(n,new pt.classes.URLSearchParams,{visitor:function(s,o,a,u){return pt.isNode&&O.isBuffer(s)?(this.append(o,s.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...t})}const cm=Dg;function Ug(n){if(n>cm)throw new Y("FormData field is too deeply nested ("+n+" levels). Max depth: "+cm,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g_(n){const t=[],s=/\w+|\[(\w*)]/g;let o;for(;(o=s.exec(n))!==null;)Ug(t.length),t.push(o[0]==="[]"?"":o[1]||o[0]);return t}function v_(n){const t={},s=Object.keys(n);let o;const a=s.length;let u;for(o=0;o=s.length;return d=!d&&O.isArray(a)?a.length:d,p?(O.hasOwnProp(a,d)?a[d]=O.isArray(a[d])?a[d].concat(o):[a[d],o]:a[d]=o,!h):((!O.hasOwnProp(a,d)||!O.isObject(a[d]))&&(a[d]=[]),t(s,o,a[d],u)&&O.isArray(a[d])&&(a[d]=v_(a[d])),!h)}if(O.isFormData(n)&&O.isFunction(n.entries)){const s={};return O.forEachEntry(n,(o,a)=>{t(g_(o),a,s,0)}),s}return null}const As=(n,t)=>n!=null&&O.hasOwnProp(n,t)?n[t]:void 0;function w_(n,t,s){if(O.isString(n))try{return(t||JSON.parse)(n),O.trim(n)}catch(o){if(o.name!=="SyntaxError")throw o}return(s||JSON.stringify)(n)}const hi={transitional:pd,adapter:["xhr","http","fetch"],transformRequest:[function(t,s){const o=s.getContentType()||"",a=o.indexOf("application/json")>-1,u=O.isObject(t);if(u&&O.isHTMLForm(t)&&(t=new FormData(t)),O.isFormData(t))return a?JSON.stringify(Bg(t)):t;if(O.isArrayBuffer(t)||O.isBuffer(t)||O.isStream(t)||O.isFile(t)||O.isBlob(t)||O.isReadableStream(t))return t;if(O.isArrayBufferView(t))return t.buffer;if(O.isURLSearchParams(t))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(u){const p=As(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return y_(t,p).toString();if((h=O.isFileList(t))||o.indexOf("multipart/form-data")>-1){const m=As(this,"env"),v=m&&m.FormData;return Ya(h?{"files[]":t}:t,v&&new v,p)}}return u||a?(s.setContentType("application/json",!1),w_(t)):t}],transformResponse:[function(t){const s=As(this,"transitional")||hi.transitional,o=s&&s.forcedJSONParsing,a=As(this,"responseType"),u=a==="json";if(O.isResponse(t)||O.isReadableStream(t))return t;if(t&&O.isString(t)&&(o&&!a||u)){const h=!(s&&s.silentJSONParsing)&&u;try{return JSON.parse(t,As(this,"parseReviver"))}catch(p){if(h)throw p.name==="SyntaxError"?Y.from(p,Y.ERR_BAD_RESPONSE,this,null,As(this,"response")):p}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:pt.classes.FormData,Blob:pt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch","query"],n=>{hi.headers[n]={}});function rc(n,t){const s=this||hi,o=t||s,a=St.from(o.headers);let u=o.data;return O.forEach(n,function(h){u=h.call(s,u,a.normalize(),t?t.status:void 0)}),a.normalize(),u}function $g(n){return!!(n&&n.__CANCEL__)}let pi=class extends Y{constructor(t,s,o){super(t??"canceled",Y.ERR_CANCELED,s,o),this.name="CanceledError",this.__CANCEL__=!0}};function Wg(n,t,s){const o=s.config.validateStatus;!s.status||!o||o(s.status)?n(s):t(new Y("Request failed with status code "+s.status,s.status>=400&&s.status<500?Y.ERR_BAD_REQUEST:Y.ERR_BAD_RESPONSE,s.config,s.request,s))}function x_(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function S_(n,t){n=n||10;const s=new Array(n),o=new Array(n);let a=0,u=0,d;return t=t!==void 0?t:1e3,function(p){const m=Date.now(),v=o[u];d||(d=m),s[a]=p,o[a]=m;let w=u,_=0;for(;w!==a;)_+=s[w++],w=w%n;if(a=(a+1)%n,a===u&&(u=(u+1)%n),m-d{s=v,a=null,u&&(clearTimeout(u),u=null),n(...m)};return[(...m)=>{const v=Date.now(),w=v-s;w>=o?d(m,v):(a=m,u||(u=setTimeout(()=>{u=null,d(a)},o-w)))},()=>a&&d(a)]}const Qa=(n,t,s=3)=>{let o=0;const a=S_(50,250);return b_(u=>{if(!u||typeof u.loaded!="number")return;const d=u.loaded,h=u.lengthComputable?u.total:void 0,p=h!=null?Math.min(d,h):d,m=Math.max(0,p-o),v=a(m);o=Math.max(o,p);const w={loaded:p,total:h,progress:h?p/h:void 0,bytes:m,rate:v||void 0,estimated:v&&h?(h-p)/v:void 0,event:u,lengthComputable:h!=null,[t?"download":"upload"]:!0};n(w)},s)},dm=(n,t)=>{const s=n!=null;return[o=>t[0]({lengthComputable:s,total:n,loaded:o}),t[1]]},fm=n=>(...t)=>O.asap(()=>n(...t)),E_=pt.hasStandardBrowserEnv?((n,t)=>s=>(s=new URL(s,pt.origin),n.protocol===s.protocol&&n.host===s.host&&(t||n.port===s.port)))(new URL(pt.origin),pt.navigator&&/(msie|trident)/i.test(pt.navigator.userAgent)):()=>!0,__=pt.hasStandardBrowserEnv?{write(n,t,s,o,a,u,d){if(typeof document>"u")return;const h=[`${n}=${encodeURIComponent(t)}`];O.isNumber(s)&&h.push(`expires=${new Date(s).toUTCString()}`),O.isString(o)&&h.push(`path=${o}`),O.isString(a)&&h.push(`domain=${a}`),u===!0&&h.push("secure"),O.isString(d)&&h.push(`SameSite=${d}`),document.cookie=h.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let s=0;sn instanceof St?{...n}:n;function ss(n,t){n=n||{},t=t||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(v,w,_,L){return O.isPlainObject(v)&&O.isPlainObject(w)?O.merge.call({caseless:L},v,w):O.isPlainObject(w)?O.merge({},w):O.isArray(w)?w.slice():w}function a(v,w,_,L){if(O.isUndefined(w)){if(!O.isUndefined(v))return o(void 0,v,_,L)}else return o(v,w,_,L)}function u(v,w){if(!O.isUndefined(w))return o(void 0,w)}function d(v,w){if(O.isUndefined(w)){if(!O.isUndefined(v))return o(void 0,v)}else return o(void 0,w)}function h(v){const w=O.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!O.isUndefined(w))if(O.isPlainObject(w)){if(O.hasOwnProp(w,v))return w[v]}else return;const _=O.hasOwnProp(n,"transitional")?n.transitional:void 0;if(O.isPlainObject(_)&&O.hasOwnProp(_,v))return _[v]}function p(v,w,_){if(O.hasOwnProp(t,_))return o(v,w);if(O.hasOwnProp(n,_))return o(void 0,v)}const m={url:u,method:u,data:u,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,allowedSocketPaths:d,responseEncoding:d,validateStatus:p,headers:(v,w,_)=>a(pm(v),pm(w),_,!0)};return O.forEach(Object.keys({...n,...t}),function(w){if(w==="__proto__"||w==="constructor"||w==="prototype")return;const _=O.hasOwnProp(m,w)?m[w]:a,L=O.hasOwnProp(n,w)?n[w]:void 0,M=O.hasOwnProp(t,w)?t[w]:void 0,k=_(L,M,w);O.isUndefined(k)&&_!==p||(s[w]=k)}),O.hasOwnProp(t,"validateStatus")&&O.isUndefined(t.validateStatus)&&h("validateStatusUndefinedResolves")===!1&&(O.hasOwnProp(n,"validateStatus")?s.validateStatus=o(void 0,n.validateStatus):delete s.validateStatus),s}const O_=["content-type","content-length"];function A_(n,t,s){if(s!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([o,a])=>{O_.includes(o.toLowerCase())&&n.set(o,a)})}const L_=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16)));function Hg(n){const t=ss({},n),s=_=>O.hasOwnProp(t,_)?t[_]:void 0,o=s("data");let a=s("withXSRFToken");const u=s("xsrfHeaderName"),d=s("xsrfCookieName");let h=s("headers");const p=s("auth"),m=s("baseURL"),v=s("allowAbsoluteUrls"),w=s("url");if(t.headers=h=St.from(h),t.url=Fg(Vg(m,w,v,t),s("params"),s("paramsSerializer")),p){const _=O.getSafeProp(p,"username")||"",L=O.getSafeProp(p,"password")||"";try{h.set("Authorization","Basic "+btoa(_+":"+(L?L_(L):"")))}catch(M){throw Y.from(M,Y.ERR_BAD_OPTION_VALUE,n)}}if(O.isFormData(o)&&(pt.hasStandardBrowserEnv||pt.hasStandardBrowserWebWorkerEnv||O.isReactNative(o)?h.setContentType(void 0):O.isFunction(o.getHeaders)&&A_(h,o.getHeaders(),s("formDataHeaderPolicy"))),pt.hasStandardBrowserEnv&&(O.isFunction(a)&&(a=a(t)),a===!0||a==null&&E_(t.url))){const L=u&&d&&__.read(d);L&&h.set(u,L)}return t}const j_=typeof XMLHttpRequest<"u",I_=j_&&function(n){return new Promise(function(s,o){const a=Hg(n);let u=a.data;const d=St.from(a.headers).normalize();let{responseType:h,onUploadProgress:p,onDownloadProgress:m}=a,v,w,_,L,M;function k(){L&&L(),M&&M(),a.cancelToken&&a.cancelToken.unsubscribe(v),a.signal&&a.signal.removeEventListener("abort",v)}let x=new XMLHttpRequest;x.open(a.method.toUpperCase(),a.url,!0),x.timeout=a.timeout;function b(){if(!x)return;const T=St.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),$={data:!h||h==="text"||h==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:T,config:n,request:x};Wg(function(G){s(G),k()},function(G){o(G),k()},$),x=null}"onloadend"in x?x.onloadend=b:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(b)},x.onabort=function(){x&&(o(new Y("Request aborted",Y.ECONNABORTED,n,x)),k(),x=null)},x.onerror=function(A){const $=A&&A.message?A.message:"Network Error",W=new Y($,Y.ERR_NETWORK,n,x);W.event=A||null,o(W),k(),x=null},x.ontimeout=function(){let A=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const $=a.transitional||pd;a.timeoutErrorMessage&&(A=a.timeoutErrorMessage),o(new Y(A,$.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,n,x)),k(),x=null},u===void 0&&d.setContentType(null),"setRequestHeader"in x&&O.forEach(jg(d),function(A,$){x.setRequestHeader($,A)}),O.isUndefined(a.withCredentials)||(x.withCredentials=!!a.withCredentials),h&&h!=="json"&&(x.responseType=a.responseType),m&&([_,M]=Qa(m,!0),x.addEventListener("progress",_)),p&&x.upload&&([w,L]=Qa(p),x.upload.addEventListener("progress",w),x.upload.addEventListener("loadend",L)),(a.cancelToken||a.signal)&&(v=T=>{x&&(o(!T||T.type?new pi(null,n,x):T),x.abort(),k(),x=null)},a.cancelToken&&a.cancelToken.subscribe(v),a.signal&&(a.signal.aborted?v():a.signal.addEventListener("abort",v)));const j=x_(a.url);if(j&&!pt.protocols.includes(j)){o(new Y("Unsupported protocol "+j+":",Y.ERR_BAD_REQUEST,n)),k();return}x.send(u||null)})},D_=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const s=new AbortController;let o=!1;const a=function(p){if(!o){o=!0,d();const m=p instanceof Error?p:this.reason;s.abort(m instanceof Y?m:new pi(m instanceof Error?m.message:m))}};let u=t&&setTimeout(()=>{u=null,a(new Y(`timeout of ${t}ms exceeded`,Y.ETIMEDOUT))},t);const d=()=>{n&&(u&&clearTimeout(u),u=null,n.forEach(p=>{p.unsubscribe?p.unsubscribe(a):p.removeEventListener("abort",a)}),n=null)};n.forEach(p=>p.addEventListener("abort",a,{once:!0}));const{signal:h}=s;return h.unsubscribe=()=>O.asap(d),h},M_=function*(n,t){let s=n.byteLength;if(s{const a=z_(n,t);let u=0,d,h=p=>{d||(d=!0,o&&o(p))};return new ReadableStream({async pull(p){try{const{done:m,value:v}=await a.next();if(m){h(),p.close();return}let w=v.byteLength;if(s){let _=u+=w;s(_)}p.enqueue(new Uint8Array(v))}catch(m){throw h(m),m}},cancel(p){return h(p),a.return()}},{highWaterMark:2})},Ka=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,U_=(n,t,s)=>t+2L>=2&&o.charCodeAt(L-2)===37&&o.charCodeAt(L-1)===51&&(o.charCodeAt(L)===68||o.charCodeAt(L)===100);m>=0&&(o.charCodeAt(m)===61?(p++,m--):v(m)&&(p++,m-=3)),p===1&&m>=0&&(o.charCodeAt(m)===61||v(m))&&p++;const _=Math.floor(d/4)*3-(p||0);return _>0?_:0}let u=0;for(let d=0,h=o.length;d=55296&&p<=56319&&d+1=56320&&m<=57343?(u+=4,d++):u+=3}else u+=3}return u}const yd="1.18.1",ym=64*1024,{isFunction:Pa}=O,$_=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16))),gm=n=>{if(!O.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},vm=(n,...t)=>{try{return!!n(...t)}catch{return!1}},W_=n=>{const t=n.indexOf("://");let s=n;return t!==-1&&(s=s.slice(t+3)),s.includes("@")||s.includes(":")},V_=n=>{const t=O.global!==void 0&&O.global!==null?O.global:globalThis,{ReadableStream:s,TextEncoder:o}=t;n=O.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:a,Request:u,Response:d}=n,h=a?Pa(a):typeof fetch=="function",p=Pa(u),m=Pa(d);if(!h)return!1;const v=h&&Pa(s),w=h&&(typeof o=="function"?(b=>j=>b.encode(j))(new o):async b=>new Uint8Array(await new u(b).arrayBuffer())),_=p&&v&&vm(()=>{let b=!1;const j=new u(pt.origin,{body:new s,method:"POST",get duplex(){return b=!0,"half"}}),T=j.headers.has("Content-Type");return j.body!=null&&j.body.cancel(),b&&!T}),L=m&&v&&vm(()=>O.isReadableStream(new d("").body)),M={stream:L&&(b=>b.body)};h&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!M[b]&&(M[b]=(j,T)=>{let A=j&&j[b];if(A)return A.call(j);throw new Y(`Response type '${b}' is not supported`,Y.ERR_NOT_SUPPORT,T)})});const k=async b=>{if(b==null)return 0;if(O.isBlob(b))return b.size;if(O.isSpecCompliantForm(b))return(await new u(pt.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(O.isArrayBufferView(b)||O.isArrayBuffer(b))return b.byteLength;if(O.isURLSearchParams(b)&&(b=b+""),O.isString(b))return(await w(b)).byteLength},x=async(b,j)=>{const T=O.toFiniteNumber(b.getContentLength());return T??k(j)};return async b=>{let{url:j,method:T,data:A,signal:$,cancelToken:W,timeout:G,onDownloadProgress:B,onUploadProgress:ie,responseType:ue,headers:Se,withCredentials:Te="same-origin",fetchOptions:xe,maxContentLength:J,maxBodyLength:Ee}=Hg(b);const be=O.isNumber(J)&&J>-1,_e=O.isNumber(Ee)&&Ee>-1,K=X=>O.hasOwnProp(b,X)?b[X]:void 0;let ae=a||fetch;ue=ue?(ue+"").toLowerCase():"text";let F=D_([$,W&&W.toAbortSignal()],G),P=null;const U=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let ce,me=null;const he=()=>new Y("Request body larger than maxBodyLength limit",Y.ERR_BAD_REQUEST,b,P);try{let X;const ve=K("auth");if(ve){const we=O.getSafeProp(ve,"username")||"",ut=O.getSafeProp(ve,"password")||"";X={username:we,password:ut}}if(W_(j)){const we=new URL(j,pt.origin);if(!X&&(we.username||we.password)){const ut=gm(we.username),Jt=gm(we.password);X={username:ut,password:Jt}}(we.username||we.password)&&(we.username="",we.password="",j=we.href)}if(X&&(Se.delete("authorization"),Se.set("Authorization","Basic "+btoa($_((X.username||"")+":"+(X.password||""))))),be&&typeof j=="string"&&j.startsWith("data:")&&B_(j)>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,b,P);if(_e&&T!=="get"&&T!=="head"){const we=await k(A);if(typeof we=="number"&&isFinite(we)&&(ce=we,we>Ee))throw he()}const Re=_e&&(O.isReadableStream(A)||O.isStream(A)),ge=(we,ut,Jt)=>mm(we,ym,Zt=>{if(_e&&Zt>Ee)throw me=he();ut&&ut(Zt)},Jt);if(_&&T!=="get"&&T!=="head"&&(ie||Re)){if(ce=ce??await x(Se,A),ce!==0||Re){let we=new u(j,{method:"POST",body:A,duplex:"half"}),ut;if(O.isFormData(A)&&(ut=we.headers.get("content-type"))&&Se.setContentType(ut),we.body){const[Jt,Zt]=ie&&dm(ce,Qa(fm(ie)))||[];A=ge(we.body,Jt,Zt)}}}else if(Re&&!p&&v&&T!=="get"&&T!=="head")A=ge(A);else if(Re&&p&&!_&&T!=="get"&&T!=="head")throw new Y("Stream request bodies are not supported by the current fetch implementation",Y.ERR_NOT_SUPPORT,b,P);O.isString(Te)||(Te=Te?"include":"omit");const rt=p&&"credentials"in u.prototype;if(O.isFormData(A)){const we=Se.getContentType();we&&/^multipart\/form-data/i.test(we)&&!/boundary=/i.test(we)&&Se.delete("content-type")}Se.set("User-Agent","axios/"+yd,!1);const Ft={...xe,signal:F,method:T.toUpperCase(),headers:jg(Se.normalize()),body:A,duplex:"half",credentials:rt?Te:void 0};P=p&&new u(j,Ft);let lt=await(p?ae(P,xe):ae(j,Ft));const Yt=St.from(lt.headers);if(be){const we=O.toFiniteNumber(Yt.getContentLength());if(we!=null&&we>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,b,P)}const Ut=L&&(ue==="stream"||ue==="response");if(L&<.body&&(B||be||Ut&&U)){const we={};["status","statusText","headers"].forEach(En=>{we[En]=lt[En]});const ut=O.toFiniteNumber(Yt.getContentLength()),[Jt,Zt]=B&&dm(ut,Qa(fm(B),!0))||[];let zn=0;const Fn=En=>{if(be&&(zn=En,zn>J))throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,b,P);Jt&&Jt(En)};lt=new d(mm(lt.body,ym,Fn,()=>{Zt&&Zt(),U&&U()}),we)}ue=ue||"text";let Bt=await M[O.findKey(M,ue)||"text"](lt,b);if(be&&!L&&!Ut){let we;if(Bt!=null&&(typeof Bt.byteLength=="number"?we=Bt.byteLength:typeof Bt.size=="number"?we=Bt.size:typeof Bt=="string"&&(we=typeof o=="function"?new o().encode(Bt).byteLength:Bt.length)),typeof we=="number"&&we>J)throw new Y("maxContentLength size of "+J+" exceeded",Y.ERR_BAD_RESPONSE,b,P)}return!Ut&&U&&U(),await new Promise((we,ut)=>{Wg(we,ut,{data:Bt,headers:St.from(lt.headers),status:lt.status,statusText:lt.statusText,config:b,request:P})})}catch(X){if(U&&U(),F&&F.aborted&&F.reason instanceof Y){const ve=F.reason;throw ve.config=b,P&&(ve.request=P),X!==ve&&Object.defineProperty(ve,"cause",{__proto__:null,value:X,writable:!0,enumerable:!1,configurable:!0}),ve}if(me)throw P&&!me.request&&(me.request=P),me;if(X instanceof Y)throw P&&!X.request&&(X.request=P),X;if(X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)){const ve=new Y("Network Error",Y.ERR_NETWORK,b,P,X&&X.response);throw Object.defineProperty(ve,"cause",{__proto__:null,value:X.cause||X,writable:!0,enumerable:!1,configurable:!0}),ve}throw Y.from(X,X&&X.code,b,P,X&&X.response)}}},H_=new Map,qg=n=>{let t=n&&n.env||{};const{fetch:s,Request:o,Response:a}=t,u=[o,a,s];let d=u.length,h=d,p,m,v=H_;for(;h--;)p=u[h],m=v.get(p),m===void 0&&v.set(p,m=h?new Map:V_(t)),v=m;return m};qg();const gd={http:s_,xhr:I_,fetch:{get:qg}};O.forEach(gd,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const wm=n=>`- ${n}`,q_=n=>O.isFunction(n)||n===null||n===!1;function Q_(n,t){n=O.isArray(n)?n:[n];const{length:s}=n;let o,a;const u={};for(let d=0;d`adapter ${p} `+(m===!1?"is not supported by the environment":"is not available in the build"));let h=s?d.length>1?`since : `+d.map(wm).join(` `):" "+wm(d[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+h,Y.ERR_NOT_SUPPORT)}return a}const Qg={getAdapter:Q_,adapters:gd};function sc(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new pi(null,n)}function xm(n){return sc(n),n.headers=St.from(n.headers),n.data=rc.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Qg.getAdapter(n.adapter||hi.adapter,n)(n).then(function(o){sc(n),n.response=o;try{o.data=rc.call(n,n.transformResponse,o)}finally{delete n.response}return o.headers=St.from(o.headers),o},function(o){if(!$g(o)&&(sc(n),o&&o.response)){n.response=o.response;try{o.response.data=rc.call(n,n.transformResponse,o.response)}finally{delete n.response}o.response.headers=St.from(o.response.headers)}return Promise.reject(o)})}const Ja={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Ja[n]=function(o){return typeof o===n||"a"+(t<1?"n ":" ")+n}});const Sm={};Ja.transitional=function(t,s,o){function a(u,d){return"[Axios v"+yd+"] Transitional option '"+u+"'"+d+(o?". "+o:"")}return(u,d,h)=>{if(t===!1)throw new Y(a(d," has been removed"+(s?" in "+s:"")),Y.ERR_DEPRECATED);return s&&!Sm[d]&&(Sm[d]=!0,console.warn(a(d," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(u,d,h):!0}};Ja.spelling=function(t){return(s,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function K_(n,t,s){if(typeof n!="object"||n===null)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const o=Object.keys(n);let a=o.length;for(;a-- >0;){const u=o[a],d=Object.prototype.hasOwnProperty.call(t,u)?t[u]:void 0;if(d){const h=n[u],p=h===void 0||d(h,u,n);if(p!==!0)throw new Y("option "+u+" must be "+p,Y.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new Y("Unknown option "+u,Y.ERR_BAD_OPTION)}}const za={assertOptions:K_,validators:Ja},wt=za.validators;let Jr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new um,response:new um}}async request(t,s){try{return await this._request(t,s)}catch(o){if(o instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const u=(()=>{if(!a.stack)return"";const d=a.stack.indexOf(` `);return d===-1?"":a.stack.slice(d+1)})();try{if(!o.stack)o.stack=u;else if(u){const d=u.indexOf(` `),h=d===-1?-1:u.indexOf(` `,d+1),p=h===-1?"":u.slice(h+1);String(o.stack).endsWith(p)||(o.stack+=` `+u)}}catch{}}throw o}}_request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=ss(this.defaults,s);const{transitional:o,paramsSerializer:a,headers:u}=s;o!==void 0&&za.assertOptions(o,{silentJSONParsing:wt.transitional(wt.boolean),forcedJSONParsing:wt.transitional(wt.boolean),clarifyTimeoutError:wt.transitional(wt.boolean),legacyInterceptorReqResOrdering:wt.transitional(wt.boolean),advertiseZstdAcceptEncoding:wt.transitional(wt.boolean),validateStatusUndefinedResolves:wt.transitional(wt.boolean)},!1),a!=null&&(O.isFunction(a)?s.paramsSerializer={serialize:a}:za.assertOptions(a,{encode:wt.function,serialize:wt.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),za.assertOptions(s,{baseUrl:wt.spelling("baseURL"),withXsrfToken:wt.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let d=u&&O.merge(u.common,u[s.method]);u&&O.forEach(["delete","get","head","post","put","patch","query","common"],M=>{delete u[M]}),s.headers=St.concat(d,u);const h=[];let p=!0;this.interceptors.request.forEach(function(k){if(typeof k.runWhen=="function"&&k.runWhen(s)===!1)return;p=p&&k.synchronous;const x=s.transitional||pd;x&&x.legacyInterceptorReqResOrdering?h.unshift(k.fulfilled,k.rejected):h.push(k.fulfilled,k.rejected)});const m=[];this.interceptors.response.forEach(function(k){m.push(k.fulfilled,k.rejected)});let v,w=0,_;if(!p){const M=[xm.bind(this),void 0];for(M.unshift(...h),M.push(...m),_=M.length,v=Promise.resolve(s);w<_;)v=v.then(M[w++],M[w++]);return v}_=h.length;let L=s;for(;w<_;){const M=h[w++],k=h[w++];try{L=M(L)}catch(x){k.call(this,x);break}}try{v=xm.call(this,L)}catch(M){return Promise.reject(M)}for(w=0,_=m.length;w<_;)v=v.then(m[w++],m[w++]);return v}getUri(t){t=ss(this.defaults,t);const s=Vg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Fg(s,t.params,t.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(t){Jr.prototype[t]=function(s,o){return this.request(ss(o||{},{method:t,url:s,data:o&&O.hasOwnProp(o,"data")?o.data:void 0}))}});O.forEach(["post","put","patch","query"],function(t){function s(o){return function(u,d,h){return this.request(ss(h||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:u,data:d}))}}Jr.prototype[t]=s(),t!=="query"&&(Jr.prototype[t+"Form"]=s(!0))});let G_=class Kg{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(u){s=u});const o=this;this.promise.then(a=>{if(!o._listeners)return;let u=o._listeners.length;for(;u-- >0;)o._listeners[u](a);o._listeners=null}),this.promise.then=a=>{let u;const d=new Promise(h=>{o.subscribe(h),u=h}).then(a);return d.cancel=function(){o.unsubscribe(u)},d},t(function(u,d,h){o.reason||(o.reason=new pi(u,d,h),s(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const t=new AbortController,s=o=>{t.abort(o)};return this.subscribe(s),t.signal.unsubscribe=()=>this.unsubscribe(s),t.signal}static source(){let t;return{token:new Kg(function(a){t=a}),cancel:t}}};function X_(n){return function(s){return n.apply(null,s)}}function Y_(n){return O.isObject(n)&&n.isAxiosError===!0}const Fc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Fc).forEach(([n,t])=>{Fc[t]=n});function Gg(n){const t=new Jr(n),s=kg(Jr.prototype.request,t);return O.extend(s,Jr.prototype,t,{allOwnKeys:!0}),O.extend(s,t,null,{allOwnKeys:!0}),s.create=function(a){return Gg(ss(n,a))},s}const Ge=Gg(hi);Ge.Axios=Jr;Ge.CanceledError=pi;Ge.CancelToken=G_;Ge.isCancel=$g;Ge.VERSION=yd;Ge.toFormData=Ya;Ge.AxiosError=Y;Ge.Cancel=Ge.CanceledError;Ge.all=function(t){return Promise.all(t)};Ge.spread=X_;Ge.isAxiosError=Y_;Ge.mergeConfig=ss;Ge.AxiosHeaders=St;Ge.formToJSON=n=>Bg(O.isHTMLForm(n)?new FormData(n):n);Ge.getAdapter=Qg.getAdapter;Ge.HttpStatusCode=Fc;Ge.default=Ge;const{Axios:$R,AxiosError:WR,CanceledError:VR,isCancel:HR,CancelToken:qR,VERSION:QR,all:KR,Cancel:GR,isAxiosError:XR,spread:YR,toFormData:JR,AxiosHeaders:ZR,HttpStatusCode:eT,formToJSON:tT,getAdapter:nT,mergeConfig:rT,create:sT}=Ge,Xg=typeof window>"u",bm=!Xg&&window.self!==window.top,J_=!Xg&&typeof document>"u",oc=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),ft=[];for(let n=0;n<256;++n)ft.push((n+256).toString(16).slice(1));function Z_(n,t=0){return(ft[n[t+0]]+ft[n[t+1]]+ft[n[t+2]]+ft[n[t+3]]+"-"+ft[n[t+4]]+ft[n[t+5]]+"-"+ft[n[t+6]]+ft[n[t+7]]+"-"+ft[n[t+8]]+ft[n[t+9]]+"-"+ft[n[t+10]]+ft[n[t+11]]+ft[n[t+12]]+ft[n[t+13]]+ft[n[t+14]]+ft[n[t+15]]).toLowerCase()}let ic;const ek=new Uint8Array(16);function tk(){if(!ic){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ic=crypto.getRandomValues.bind(crypto)}return ic(ek)}const nk=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Em={randomUUID:nk};function rk(n,t,s){var a;n=n||{};const o=n.random??((a=n.rng)==null?void 0:a.call(n))??tk();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,Z_(o)}function sk(n,t,s){return Em.randomUUID&&!n?Em.randomUUID():rk(n)}const Bo=typeof window<"u"?window:{base44SharedInstances:{}};function ok(n,t){return Bo.base44SharedInstances||(Bo.base44SharedInstances={}),Bo.base44SharedInstances[n]||(Bo.base44SharedInstances[n]={instance:t()}),Bo.base44SharedInstances[n].instance}const ik="__user_heartbeat_event__",ak="__initialization_event__",lk="__session_duration_event__",_m="analytics-enable",km="base44_analytics_session_id",uk={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},ck="analytics",ze=ok(ck,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...uk,...vk()}})),dk=({axiosClient:n,serverUrl:t,appId:s,userAuthModule:o})=>{var a;const{maxQueueSize:u,throttleTime:d,batchSize:h}=ze.config;if(!(!((a=ze.config)===null||a===void 0)&&a.enabled)||J_)return{track:()=>{},cleanup:()=>{}};let p;const m=`${t}/api/apps/${s}/analytics/track/batch`,v=async T=>{await n.request({method:"POST",url:`/apps/${s}/analytics/track/batch`,data:{events:T}})},w=T=>{try{const A=JSON.stringify({events:T}),$=new Blob([A],{type:"application/json"});return typeof navigator>"u"||A.length>6e4||!navigator.sendBeacon(m,$)}catch{return!1}},_=async(T,A={})=>{if(T.length===0)return;const $=await gk(o),W=T.map(yk($));try{(!A.isBeacon||!w(W))&&await v(W)}catch{}},L=()=>{Rm(_,{throttleTime:d,batchSize:h})},M=T=>{if(ze.requestsQueue.length>=u)return;const A=mk();ze.requestsQueue.push({...T,...A}),L()},k=()=>{Rm(_,{throttleTime:d,batchSize:h}),p=Tm(M),hk()},x=()=>{Cm(),p==null||p(),pk(M);const T=ze.requestsQueue.splice(0);_(T,{isBeacon:!0})},b=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&k())},j=()=>{Cm(),p==null||p(),typeof window<"u"&&window.removeEventListener("visibilitychange",b)};return L(),p=Tm(M),fk(M),typeof window<"u"&&window.addEventListener("visibilitychange",b),{track:M,cleanup:j}};function Cm(){ze.isProcessing=!1}async function Rm(n,t){if(ze.isProcessing)return;ze.isProcessing=!0;const{throttleTime:s=1e3,batchSize:o=30}=t??{};for(;ze.isProcessing&&ze.requestsQueue.length>0;){const a=ze.requestsQueue.splice(0,o);a.length&&await n(a),await new Promise(u=>setTimeout(u,s))}ze.isProcessing=!1}function Tm(n){var t;if(ze.isHeartBeatProcessing||((t=ze.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};ze.isHeartBeatProcessing=!0;const s=setInterval(()=>{n({eventName:ik})},ze.config.heartBeatInterval);return()=>{clearInterval(s),ze.isHeartBeatProcessing=!1}}function fk(n){typeof window>"u"||ze.wasInitializationTracked||(ze.wasInitializationTracked=!0,n({eventName:ak,properties:{referrer:document==null?void 0:document.referrer}}))}function hk(){typeof window>"u"||ze.sessionStartTime!==null||(ze.sessionStartTime=new Date().toISOString())}function pk(n){if(typeof window>"u"||ze.sessionStartTime===null)return;const t=new Date().getTime()-new Date(ze.sessionStartTime).getTime();ze.sessionStartTime=null,n({eventName:lk,properties:{sessionDuration:t}})}function mk(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function yk(n){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...n})}let ac=null;async function gk(n){if(!ze.sessionContext){if(!ac){const t=vd();ac=n.me().then(s=>({user_id:s.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}ze.sessionContext=await ac}return ze.sessionContext}function vk(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(_m);if(t==null||!t.length)return;const s=new URLSearchParams(window.location.search);s.delete(_m);const o=window.location.pathname+(s.toString()?"?"+s.toString():"");return window.history.replaceState({},"",o),{enabled:t==="true"}}function vd(){if(typeof window>"u")return oc();try{const n=localStorage.getItem(km);if(!n){const t=oc();return localStorage.setItem(km,t),t}return n}catch{return oc()}}class wk extends Error{constructor(t,s,o,a,u){super(t),this.name="Base44Error",this.status=s,this.code=o,this.data=a,this.originalError=u}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Vo({baseURL:n,headers:t={},token:s,interceptResponses:o=!0,onError:a}){const u=Ge.create({baseURL:n,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return s&&(u.defaults.headers.common.Authorization=`Bearer ${s}`),u.interceptors.request.use(d=>{typeof window<"u"&&window.location&&(d.headers.set("X-Origin-URL",window.location.href),d.headers.get("Authorization")||d.headers.set("X-Base44-Anonymous-Id",vd()));const h=sk();if(d.requestId=h,bm)try{window.parent.postMessage({type:"api-request-start",requestId:h,data:{url:n+d.url,method:d.method,body:d.data instanceof FormData?"[FormData object]":d.data}},"*")}catch{}return d}),o&&u.interceptors.response.use(d=>{var h;const p=(h=d.config)===null||h===void 0?void 0:h.requestId;try{bm&&p&&window.parent.postMessage({type:"api-request-end",requestId:p,data:{statusCode:d.status,response:d.data}},"*")}catch{}return d.data},d=>{var h,p,m,v,w,_,L,M;const k=((p=(h=d.response)===null||h===void 0?void 0:h.data)===null||p===void 0?void 0:p.message)||((v=(m=d.response)===null||m===void 0?void 0:m.data)===null||v===void 0?void 0:v.detail)||d.message,x=new wk(k,(w=d.response)===null||w===void 0?void 0:w.status,(L=(_=d.response)===null||_===void 0?void 0:_.data)===null||L===void 0?void 0:L.code,(M=d.response)===null||M===void 0?void 0:M.data,d);return a==null||a(x),Promise.reject(x)}),u}function Nm(n){const{axios:t,appId:s,getSocket:o}=n;return new Proxy({},{get(a,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return Sk(t,s,u,o)}})}function xk(n){var t;try{const s=JSON.parse(n);return{type:s.type,data:s.data,id:s.id||((t=s.data)===null||t===void 0?void 0:t.id),timestamp:s.timestamp||new Date().toISOString()}}catch(s){return console.warn("[Base44 SDK] Failed to parse realtime message:",s),null}}function Sk(n,t,s,o){const a=`/apps/${t}/entities/${s}`;return{async list(u,d,h,p){const m={};return u&&(m.sort=u),d&&(m.limit=d),h&&(m.skip=h),p&&(m.fields=Array.isArray(p)?p.join(","):p),n.get(a,{params:m})},async filter(u,d,h,p,m){const v={q:JSON.stringify(u)};return d&&(v.sort=d),h&&(v.limit=h),p&&(v.skip=p),m&&(v.fields=Array.isArray(m)?m.join(","):m),n.get(a,{params:v})},async get(u){return n.get(`${a}/${u}`)},async create(u){return n.post(a,u)},async update(u,d){return n.put(`${a}/${u}`,d)},async delete(u){return n.delete(`${a}/${u}`)},async deleteMany(u){return n.delete(a,{data:u})},async bulkCreate(u){return n.post(`${a}/bulk`,u)},async updateMany(u,d){return n.patch(`${a}/update-many`,{query:u,data:d})},async bulkUpdate(u){return n.put(`${a}/bulk`,u)},async importEntities(u){const d=new FormData;return d.append("file",u,u.name),n.post(`${a}/import`,d,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(u){const d=`entities:${t}:${s}`;return o().subscribeToRoom(d,{update_model:m=>{var v;const w=xk(m.data);if(w){w.type!=="delete"&&(!((v=w.data)===null||v===void 0)&&v._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${s}#${w.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${s}.get("${w.id}")\` to fetch the full record.`);try{u(w)}catch(_){console.error("[Base44 SDK] Subscription callback error:",_)}}}})}}}function bk(n,t){return{async call(s,o,a){if(!(s!=null&&s.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(o!=null&&o.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:u,queryParams:d,...h}=a??{},p={...h,...u&&{path_params:u},...d&&{query_params:d}};return await n.post(`/apps/${t}/integrations/custom/${s}/${o}`,p)}}}function Pm(n,t){const s=bk(n,t);return new Proxy({},{get(o,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return a==="custom"?s:new Proxy({},{get(u,d){if(!(typeof d!="string"||d==="then"||d.startsWith("_")))return async h=>{if(typeof h=="string")throw new Error(`Integration ${d} must receive an object with named parameters, received: ${h}`);let p,m;return h instanceof FormData||h&&Object.values(h).some(v=>v instanceof File)?(p=new FormData,Object.keys(h).forEach(v=>{h[v]instanceof File?p.append(v,h[v],h[v].name):typeof h[v]=="object"&&h[v]!==null?p.append(v,JSON.stringify(h[v])):p.append(v,h[v])}),m="multipart/form-data"):(p=h,m="application/json"),a==="Core"?n.post(`/apps/${t}/integration-endpoints/Core/${d}`,p||h,{headers:{"Content-Type":m}}):n.post(`/apps/${t}/integration-endpoints/installable/${a}/integration-endpoints/${d}`,p||h,{headers:{"Content-Type":m}})}}})}})}function Ek(){return typeof window>"u"?!1:window!==window.parent}function _k(n,t,s){const u=Math.round(window.screenX+(window.outerWidth-500)/2),d=Math.round(window.screenY+(window.outerHeight-600)/2),h=window.open(n,"base44_auth",`width=500,height=600,left=${u},top=${d},resizable=yes,scrollbars=yes`);if(!h)return;const p=()=>{window.removeEventListener("message",m),clearInterval(v),h.closed||h.close()},m=w=>{var _;if(w.origin!==s||w.source!==h||!(!((_=w.data)===null||_===void 0)&&_.access_token))return;p();const L=new URL(t),{access_token:M,is_new_user:k}=w.data;L.searchParams.set("access_token",M),k!=null&&L.searchParams.set("is_new_user",String(k)),window.location.href=L.toString()},v=setInterval(()=>{h.closed&&p()},500);window.addEventListener("message",m)}function kk(n,t,s,o){return{async me(){return n.get(`/apps/${s}/entities/User/me`)},async updateMe(a){return n.put(`/apps/${s}/entities/User/me`,a)},redirectToLogin(a){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const u=a?new URL(a,window.location.origin).toString():window.location.href,d=`${o.appBaseUrl}/login?from_url=${encodeURIComponent(u)}`;window.location.href=d},loginWithProvider(a,u="/"){const d=new URL(u,window.location.origin).toString(),h=`app_id=${s}&from_url=${encodeURIComponent(d)}`;let p;a==="sso"?p=`/apps/${s}/auth/sso/login`:p=`/apps/auth${a==="google"?"":`/${a}`}/login`;const m=`${o.appBaseUrl}/api${p}?${h}`;if(Ek()){const v=`${m}&popup_origin=${encodeURIComponent(window.location.origin)}`;return _k(v,d,window.location.origin)}window.location.href=m},logout(a){if(delete n.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(h){console.error("Failed to remove token from localStorage:",h)}const u=a||window.location.href,d=`${o.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(u)}`;window.location.href=d}},setToken(a,u=!0){if(a&&(n.defaults.headers.common.Authorization=`Bearer ${a}`,t.defaults.headers.common.Authorization=`Bearer ${a}`,u&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",a),window.localStorage.setItem("token",a)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(a,u,d){var h;try{const p=await n.post(`/apps/${s}/auth/login`,{email:a,password:u,...d&&{turnstile_token:d}}),{access_token:m,user:v}=p;return m&&this.setToken(m),{access_token:m,user:v}}catch(p){throw((h=p.response)===null||h===void 0?void 0:h.status)===401&&await this.logout(),p}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(a,u){return n.post(`/apps/${s}/users/invite-user`,{user_email:a,role:u})},register(a){return n.post(`/apps/${s}/auth/register`,a)},verifyOtp({email:a,otpCode:u}){return n.post(`/apps/${s}/auth/verify-otp`,{email:a,otp_code:u})},resendOtp(a){return n.post(`/apps/${s}/auth/resend-otp`,{email:a})},resetPasswordRequest(a){return n.post(`/apps/${s}/auth/reset-password-request`,{email:a})},resetPassword({resetToken:a,newPassword:u}){return n.post(`/apps/${s}/auth/reset-password`,{reset_token:a,new_password:u})},changePassword({userId:a,currentPassword:u,newPassword:d}){return n.post(`/apps/${s}/auth/change-password`,{user_id:a,current_password:u,new_password:d})}}}function Ck(n,t){return{async getAccessToken(s){const o=`/apps/${t}/auth/sso/accesstoken/${s}`;return n.get(o)},async getIdToken(s){const o=`/apps/${t}/auth/sso/idtoken/${s}`;return n.get(o)}}}function Rk(n,t){return{async getAccessToken(s){if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");return(await n.get(`/apps/${t}/external-auth/tokens/${s}`)).access_token},async getConnection(s){var o;if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");const u=await n.get(`/apps/${t}/external-auth/tokens/${s}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getWorkspaceConnection(s){var o;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await n.get(`/apps/${t}/external-auth/tokens/connectors/${s}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getCurrentAppUserAccessToken(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await n.get(`/apps/${t}/app-user-auth/connectors/${s}/token`)).access_token},async getCurrentAppUserConnection(s){var o;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await n.get(`/apps/${t}/app-user-auth/connectors/${s}/token`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}}}}function Tk(n,t){return{async connectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await n.post(`/apps/${t}/app-user-auth/connectors/${s}/initiate`)).redirect_url},async disconnectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");await n.delete(`/apps/${t}/app-user-auth/connectors/${s}`)}}}function Zr(n={}){const{storageKey:t="base44_access_token",paramName:s="access_token",saveToStorage:o=!0,removeFromUrl:a=!0}=n;let u=null;if(typeof window<"u"&&window.location)try{const d=new URLSearchParams(window.location.search);if(u=d.get(s),u){if(o&&Nk(u,{storageKey:t}),a){d.delete(s);const h=`${window.location.pathname}${d.toString()?`?${d.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}return u}}catch(d){console.error("Error retrieving token from URL:",d)}if(typeof window<"u"&&window.localStorage)try{return u=window.localStorage.getItem(t),u}catch(d){console.error("Error retrieving token from local storage:",d)}return null}function Nk(n,t){const{storageKey:s="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!n)return!1;try{return window.localStorage.setItem(s,n),window.localStorage.setItem("token",n),!0}catch(o){return console.error("Error saving token to local storage:",o),!1}}function Om(n,t,s){const o=(u,d)=>u?`${String(u).replace(/\/$/,"")}${d}`:d,a=u=>{const d=new Headers;if(s!=null&&s.getAuthHeaders){const h=s.getAuthHeaders();Object.entries(h).forEach(([p,m])=>{m!=null&&d.set(p,String(m))})}return u&&new Headers(u).forEach((h,p)=>{d.set(p,h)}),d};return{async invoke(u,d){if(typeof d=="string")throw new Error(`Function ${u} must receive an object with named parameters, received: ${d}`);let h,p;return d instanceof FormData||d&&Object.values(d).some(m=>m instanceof File)?(h=new FormData,Object.keys(d).forEach(m=>{d[m]instanceof File?h.append(m,d[m],d[m].name):typeof d[m]=="object"&&d[m]!==null?h.append(m,JSON.stringify(d[m])):h.append(m,d[m])}),p="multipart/form-data"):(h=d,p="application/json"),n.post(`/apps/${t}/functions/${u}`,h||d,{headers:{"Content-Type":p}})},async fetch(u,d={}){const p=`/functions${u.startsWith("/")?u:`/${u}`}`,m=a(d.headers),v={...d,headers:m};return await fetch(o(s==null?void 0:s.baseURL,p),v)}}}function Am({axios:n,getSocket:t,appId:s,serverUrl:o,token:a}){const u=`/apps/${s}/agents`,d={},h=()=>n.get(`${u}/conversations`),p=k=>n.get(`${u}/conversations/${k}`);return{getConversations:h,getConversation:p,listConversations:k=>n.get(`${u}/conversations`,{params:k}),createConversation:k=>n.post(`${u}/conversations`,k),addMessage:async(k,x)=>n.post(`${u}/conversations/v2/${k.id}/messages`,x),subscribeToConversation:(k,x)=>{const b=`/agent-conversations/${k}`,j=t(),T=p(k).then(A=>(d[k]=A,A));return j.subscribeToRoom(b,{connect:()=>{},update_model:async({data:A})=>{const $=JSON.parse(A);if($._message){await T;const W=$._message,G=d[k];if(G){const B=G.messages||[],ie=B.findIndex(Se=>Se.id===W.id),ue=ie!==-1?B.map((Se,Te)=>Te===ie?W:Se):[...B,W];d[k]={...G,messages:ue},x==null||x(d[k])}}}})},getWhatsAppConnectURL:k=>{const x=`${o}/api/apps/${s}/agents/${encodeURIComponent(k)}/whatsapp`,b=a??Zr();return b?`${x}?token=${b}`:x},getTelegramConnectURL:k=>{const x=`${o}/api/apps/${s}/agents/${encodeURIComponent(k)}/telegram`,b=a??Zr();return b?`${x}?token=${b}`:x}}}function Lm({serverUrl:n,token:t,appId:s}){return{connection:()=>{var a;return{baseURL:`${n}/api/apps/${s}/ai/openai/v1`,token:(a=t??Zr())!==null&&a!==void 0?a:""}}}}function jm(n,t){const s=`/app-logs/${t}`;return{async logUserInApp(o){await n.post(`${s}/log-user-in-app/${o}`)},async fetchLogs(o={}){return await n.get(s,{params:o})},async getStats(o={}){return await n.get(`${s}/stats`,{params:o})}}}function Pk(n,t){return{async inviteUser(s,o){if(o!=="user"&&o!=="admin")throw new Error(`Invalid role: "${o}". Role must be either "user" or "admin".`);return await n.post(`/apps/${t}/runtime/users/invite-user`,{user_email:s,role:o})}}}const Sn=Object.create(null);Sn.open="0";Sn.close="1";Sn.ping="2";Sn.pong="3";Sn.message="4";Sn.upgrade="5";Sn.noop="6";const Fa=Object.create(null);Object.keys(Sn).forEach(n=>{Fa[Sn[n]]=n});const Uc={type:"error",data:"parser error"},Yg=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Jg=typeof ArrayBuffer=="function",Zg=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,wd=({type:n,data:t},s,o)=>Yg&&t instanceof Blob?s?o(t):Im(t,o):Jg&&(t instanceof ArrayBuffer||Zg(t))?s?o(t):Im(new Blob([t]),o):o(Sn[n]+(t||"")),Im=(n,t)=>{const s=new FileReader;return s.onload=function(){const o=s.result.split(",")[1];t("b"+(o||""))},s.readAsDataURL(n)};function Dm(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let lc;function Ok(n,t){if(Yg&&n.data instanceof Blob)return n.data.arrayBuffer().then(Dm).then(t);if(Jg&&(n.data instanceof ArrayBuffer||Zg(n.data)))return t(Dm(n.data));wd(n,!1,s=>{lc||(lc=new TextEncoder),t(lc.encode(s))})}const Mm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ho=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n{let t=n.length*.75,s=n.length,o,a=0,u,d,h,p;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);const m=new ArrayBuffer(t),v=new Uint8Array(m);for(o=0;o>4,v[a++]=(d&15)<<4|h>>2,v[a++]=(h&3)<<6|p&63;return m},Lk=typeof ArrayBuffer=="function",xd=(n,t)=>{if(typeof n!="string")return{type:"message",data:ev(n,t)};const s=n.charAt(0);return s==="b"?{type:"message",data:jk(n.substring(1),t)}:Fa[s]?n.length>1?{type:Fa[s],data:n.substring(1)}:{type:Fa[s]}:Uc},jk=(n,t)=>{if(Lk){const s=Ak(n);return ev(s,t)}else return{base64:!0,data:n}},ev=(n,t)=>{switch(t){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},tv="",Ik=(n,t)=>{const s=n.length,o=new Array(s);let a=0;n.forEach((u,d)=>{wd(u,!1,h=>{o[d]=h,++a===s&&t(o.join(tv))})})},Dk=(n,t)=>{const s=n.split(tv),o=[];for(let a=0;a{const o=s.length;let a;if(o<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,o);else if(o<65536){a=new Uint8Array(3);const u=new DataView(a.buffer);u.setUint8(0,126),u.setUint16(1,o)}else{a=new Uint8Array(9);const u=new DataView(a.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(o))}n.data&&typeof n.data!="string"&&(a[0]|=128),t.enqueue(a),t.enqueue(s)})}})}let uc;function Oa(n){return n.reduce((t,s)=>t+s.length,0)}function Aa(n,t){if(n[0].length===t)return n.shift();const s=new Uint8Array(t);let o=0;for(let a=0;aMath.pow(2,21)-1){h.enqueue(Uc);break}a=v*Math.pow(2,32)+m.getUint32(4),o=3}else{if(Oa(s)n){h.enqueue(Uc);break}}}})}const nv=4;function Ye(n){if(n)return Fk(n)}function Fk(n){for(var t in Ye.prototype)n[t]=Ye.prototype[t];return n}Ye.prototype.on=Ye.prototype.addEventListener=function(n,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(t),this};Ye.prototype.once=function(n,t){function s(){this.off(n,s),t.apply(this,arguments)}return s.fn=t,this.on(n,s),this};Ye.prototype.off=Ye.prototype.removeListener=Ye.prototype.removeAllListeners=Ye.prototype.removeEventListener=function(n,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+n];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var o,a=0;aPromise.resolve().then(t):(t,s)=>s(t,0),Xt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Uk="arraybuffer";function rv(n,...t){return t.reduce((s,o)=>(n.hasOwnProperty(o)&&(s[o]=n[o]),s),{})}const Bk=Xt.setTimeout,$k=Xt.clearTimeout;function el(n,t){t.useNativeTimers?(n.setTimeoutFn=Bk.bind(Xt),n.clearTimeoutFn=$k.bind(Xt)):(n.setTimeoutFn=Xt.setTimeout.bind(Xt),n.clearTimeoutFn=Xt.clearTimeout.bind(Xt))}const Wk=1.33;function Vk(n){return typeof n=="string"?Hk(n):Math.ceil((n.byteLength||n.size)*Wk)}function Hk(n){let t=0,s=0;for(let o=0,a=n.length;o=57344?s+=3:(o++,s+=4);return s}function sv(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function qk(n){let t="";for(let s in n)n.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(n[s]));return t}function Qk(n){let t={},s=n.split("&");for(let o=0,a=s.length;o{this.readyState="paused",t()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||s()})),this.writable||(o++,this.once("drain",function(){--o||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};Dk(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Ik(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=sv()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let ov=!1;try{ov=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Xk=ov;function Yk(){}class Jk extends Gk{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let o=location.port;o||(o=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}}doWrite(t,s){const o=this.request({method:"POST",data:t});o.on("success",s),o.on("error",(a,u)=>{this.onError("xhr post error",a,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,o)=>{this.onError("xhr poll error",s,o)}),this.pollXhr=t}}class xn extends Ye{constructor(t,s,o){super(),this.createRequest=t,el(this,o),this._opts=o,this._method=o.method||"GET",this._uri=s,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var t;const s=rv(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(s);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&o.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var a;o.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=xn.requestsCount++,xn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Yk,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete xn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}xn.requestsCount=0;xn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zm);else if(typeof addEventListener=="function"){const n="onpagehide"in Xt?"pagehide":"unload";addEventListener(n,zm,!1)}}function zm(){for(let n in xn.requests)xn.requests.hasOwnProperty(n)&&xn.requests[n].abort()}const Zk=(function(){const n=iv({xdomain:!1});return n&&n.responseType!==null})();class eC extends Jk{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=Zk&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new xn(iv,this.uri(),t)}}function iv(n){const t=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Xk))return new XMLHttpRequest}catch{}if(!t)try{return new Xt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const av=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class tC extends Sd{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,o=av?{}:rv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,o)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s{try{this.doWrite(o,u)}catch{}a&&Za(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=sv()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const cc=Xt.WebSocket||Xt.MozWebSocket;class nC extends tC{createSocket(t,s,o){return av?new cc(t,s,o):s?new cc(t,s):new cc(t)}doWrite(t,s){this.ws.send(s)}}class rC extends Sd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=zk(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=t.readable.pipeThrough(s).getReader(),a=Mk();a.readable.pipeTo(t.writable),this._writer=a.writable.getWriter();const u=()=>{o.read().then(({done:h,value:p})=>{h||(this.onPacket(p),u())}).catch(h=>{})};u();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s{a&&Za(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const sC={websocket:nC,webtransport:rC,polling:eC},oC=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,iC=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Bc(n){if(n.length>8e3)throw"URI too long";const t=n,s=n.indexOf("["),o=n.indexOf("]");s!=-1&&o!=-1&&(n=n.substring(0,s)+n.substring(s,o).replace(/:/g,";")+n.substring(o,n.length));let a=oC.exec(n||""),u={},d=14;for(;d--;)u[iC[d]]=a[d]||"";return s!=-1&&o!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=aC(u,u.path),u.queryKey=lC(u,u.query),u}function aC(n,t){const s=/\/{2,9}/g,o=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&o.splice(0,1),t.slice(-1)=="/"&&o.splice(o.length-1,1),o}function lC(n,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,a,u){a&&(s[a]=u)}),s}const $c=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ua=[];$c&&addEventListener("offline",()=>{Ua.forEach(n=>n())},!1);class xr extends Ye{constructor(t,s){if(super(),this.binaryType=Uk,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const o=Bc(t);s.hostname=o.host,s.secure=o.protocol==="https"||o.protocol==="wss",s.port=o.port,o.query&&(s.query=o.query)}else s.host&&(s.hostname=Bc(s.host).host);el(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(o=>{const a=o.prototype.name;this.transports.push(a),this._transportsByName[a]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Qk(this.opts.query)),$c&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ua.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=nv,s.transport=t,this.id&&(s.sid=this.id);const o=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&xr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",xr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let o=0;o0&&s>this._maxPayload)return this.writeBuffer.slice(0,o);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Za(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,o){return this._sendPacket("message",t,s,o),this}send(t,s,o){return this._sendPacket("message",t,s,o),this}_sendPacket(t,s,o,a){if(typeof s=="function"&&(a=s,s=void 0),typeof o=="function"&&(a=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const u={type:t,data:s,options:o};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),a&&this.once("flush",a),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},o=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():t()}):this.upgrading?o():t()),this}_onError(t){if(xr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),$c&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=Ua.indexOf(this._offlineEventListener);o!==-1&&Ua.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}xr.protocol=nv;class uC extends xr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{o||(s.send([{type:"ping",data:"probe"}]),s.once("packet",w=>{if(!o)if(w.type==="pong"&&w.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;xr.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(v(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const _=new Error("probe error");_.transport=s.name,this.emitReserved("upgradeError",_)}}))};function u(){o||(o=!0,v(),s.close(),s=null)}const d=w=>{const _=new Error("probe error: "+w);_.transport=s.name,u(),this.emitReserved("upgradeError",_)};function h(){d("transport closed")}function p(){d("socket closed")}function m(w){s&&w.name!==s.name&&u()}const v=()=>{s.removeListener("open",a),s.removeListener("error",d),s.removeListener("close",h),this.off("close",p),this.off("upgrading",m)};s.once("open",a),s.once("error",d),s.once("close",h),this.once("close",p),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{o||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let o=0;osC[u]).filter(u=>!!u)),super(o?a:t,a)}};function dC(n,t="",s){let o=n;s=s||typeof location<"u"&&location,n==null&&(n=s.protocol+"//"+s.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=s.protocol+n:n=s.host+n),/^(https?|wss?):\/\//.test(n)||(typeof s<"u"?n=s.protocol+"//"+n:n="https://"+n),o=Bc(n)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const u=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+u+":"+o.port+t,o.href=o.protocol+"://"+u+(s&&s.port===o.port?"":":"+o.port),o}const fC=typeof ArrayBuffer=="function",hC=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,lv=Object.prototype.toString,pC=typeof Blob=="function"||typeof Blob<"u"&&lv.call(Blob)==="[object BlobConstructor]",mC=typeof File=="function"||typeof File<"u"&&lv.call(File)==="[object FileConstructor]";function bd(n){return fC&&(n instanceof ArrayBuffer||hC(n))||pC&&n instanceof Blob||mC&&n instanceof File}function Ba(n,t){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let s=0,o=n.length;s=0&&n.numthis.opts.maxAttachments)throw new Error("too many attachments");o.attachments=h}if(t.charAt(s+1)==="/"){const u=s+1;for(;++s&&!(t.charAt(s)===","||s===t.length););o.nsp=t.substring(u,s)}else o.nsp="/";const a=t.charAt(s+1);if(a!==""&&Number(a)==a){const u=s+1;for(;++s;){const d=t.charAt(s);if(d==null||Number(d)!=d){--s;break}if(s===t.length)break}o.id=Number(t.substring(u,s+1))}if(t.charAt(++s)){const u=this.tryParse(t.substr(s));if(Ed.isPayloadValid(o.type,u))o.data=u;else throw new Error("invalid payload")}return o}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,s){switch(t){case Oe.CONNECT:return Fm(s);case Oe.DISCONNECT:return s===void 0;case Oe.CONNECT_ERROR:return typeof s=="string"||Fm(s);case Oe.EVENT:case Oe.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&vC.indexOf(s[0])===-1);case Oe.ACK:case Oe.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class xC{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const s=gC(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const SC=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};function Fm(n){return Object.prototype.toString.call(n)==="[object Object]"}const bC=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ed,Encoder:wC,get PacketType(){return Oe}},Symbol.toStringTag,{value:"Module"}));function cn(n,t,s){return n.on(t,s),function(){n.off(t,s)}}const EC=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class uv extends Ye{constructor(t,s,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[cn(t,"open",this.onopen.bind(this)),cn(t,"packet",this.onpacket.bind(this)),cn(t,"error",this.onerror.bind(this)),cn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var o,a,u;if(EC.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const d={type:Oe.EVENT,data:s};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const v=this.ids++,w=s.pop();this._registerAckCallback(v,w),d.id=v}const h=(a=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||a===void 0?void 0:a.writable,p=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!h||(p?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(t,s){var o;const a=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(a===void 0){this.acks[t]=s;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let h=0;h{this.io.clearTimeoutFn(u),s.apply(this,h)};d.withError=!0,this.acks[t]=d}emitWithAck(t,...s){return new Promise((o,a)=>{const u=(d,h)=>d?a(d):o(h);u.withError=!0,s.push(u),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((a,...u)=>(this._queue[0],a!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(a)):(this._queue.shift(),s&&s(null,...u)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Oe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(o=>String(o.id)===t)){const o=this.acks[t];delete this.acks[t],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Oe.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Oe.EVENT:case Oe.BINARY_EVENT:this.onevent(t);break;case Oe.ACK:case Oe.BINARY_ACK:this.onack(t);break;case Oe.DISCONNECT:this.ondisconnect();break;case Oe.CONNECT_ERROR:this.destroy();const o=new Error(t.data.message);o.data=t.data.data,this.emitReserved("connect_error",o);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const o of s)o.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let o=!1;return function(...a){o||(o=!0,s.packet({type:Oe.ACK,id:t,data:a}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Oe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let o=0;o0&&n.jitter<=1?n.jitter:0,this.attempts=0}Js.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*n);n=(Math.floor(t*10)&1)==0?n-s:n+s}return Math.min(n,this.max)|0};Js.prototype.reset=function(){this.attempts=0};Js.prototype.setMin=function(n){this.ms=n};Js.prototype.setMax=function(n){this.max=n};Js.prototype.setJitter=function(n){this.jitter=n};class Hc extends Ye{constructor(t,s){var o;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,el(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((o=s.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Js({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const a=s.parser||bC;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new cC(this.uri,this.opts);const s=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const a=cn(s,"open",function(){o.onopen(),t&&t()}),u=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),t?t(h):this.maybeReconnectOnOpen()},d=cn(s,"error",u);if(this._timeout!==!1){const h=this._timeout,p=this.setTimeoutFn(()=>{a(),u(new Error("timeout")),s.close()},h);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(a),this.subs.push(d),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(cn(t,"ping",this.onping.bind(this)),cn(t,"data",this.ondata.bind(this)),cn(t,"error",this.onerror.bind(this)),cn(t,"close",this.onclose.bind(this)),cn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){Za(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let o=this.nsps[t];return o?this._autoConnect&&!o.active&&o.connect():(o=new uv(this,t,s),this.nsps[t]=o),o}_destroy(t){const s=Object.keys(this.nsps);for(const o of s)if(this.nsps[o].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let o=0;ot()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(a=>{a?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",a)):t.onreconnect()}))},s);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const $o={};function $a(n,t){typeof n=="object"&&(t=n,n=void 0),t=t||{};const s=dC(n,t.path||"/socket.io"),o=s.source,a=s.id,u=s.path,d=$o[a]&&u in $o[a].nsps,h=t.forceNew||t["force new connection"]||t.multiplex===!1||d;let p;return h?p=new Hc(o,t):($o[a]||($o[a]=new Hc(o,t)),p=$o[a]),s.query&&!t.query&&(t.query=s.queryKey),p.socket(s.path,t)}Object.assign($a,{Manager:Hc,Socket:uv,io:$a,connect:$a});const _C=250;function Um(n,t){var s;const o=(s=n.token)!==null&&s!==void 0?s:Zr(),a={app_id:n.appId,token:o};o||(a.anonymous_id=vd());const u=$a(n.serverUrl,{path:n.mountPath,transports:n.transports,query:a});return u.on("connect",async()=>{var d;return console.log("connect",u.id),(d=t.connect)===null||d===void 0?void 0:d.call(t)}),u.on("update_model",async d=>{var h;return(h=t.update_model)===null||h===void 0?void 0:h.call(t,d)}),u.on("error",async d=>{var h;return(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u.on("connect_error",async d=>{var h;return console.error("connect_error",d),(h=t.error)===null||h===void 0?void 0:h.call(t,d)}),u}function kC({config:n}){let t={...n};const s={},o={},a={connect:async()=>{const b=[];Object.keys(s).forEach(j=>{const T=_(j);T.length!==0&&(m(j),T.forEach(({connect:A})=>{const $=async()=>A==null?void 0:A();b.push($())}))}),await Promise.all(b)},update_model:async b=>{const T=_(b.room).map(A=>{var $;return($=A.update_model)===null||$===void 0?void 0:$.call(A,b)});await Promise.all(T)},error:async b=>{console.error("error",b);const j=Object.values(s).flat().map(T=>{var A;return(A=T.error)===null||A===void 0?void 0:A.call(T,b)});await Promise.all(j)}};let u=Um(n,a);function d(){h()}function h(){M(),u&&u.disconnect()}function p(b){d(),t={...t,...b},u=Um(t,a)}function m(b){u.emit("join",b)}function v(b){u.emit("leave",b)}async function w(b,j){var T;const A=JSON.stringify(j);return(T=a.update_model)===null||T===void 0?void 0:T.call(a,{room:b,data:A})}function _(b){var j;return(j=s[b])!==null&&j!==void 0?j:[]}function L(b){const j=o[b];j&&(clearTimeout(j),delete o[b])}function M(){Object.keys(o).forEach(b=>{var j,T;clearTimeout(o[b]),delete o[b],((T=(j=s[b])===null||j===void 0?void 0:j.length)!==null&&T!==void 0?T:0)===0&&delete s[b]})}function k(b){L(b),o[b]=setTimeout(()=>{var j,T;delete o[b],!(((T=(j=s[b])===null||j===void 0?void 0:j.length)!==null&&T!==void 0?T:0)>0)&&(v(b),delete s[b])},_C)}return{socket:u,subscribeToRoom:(b,j)=>{s[b]?L(b):(m(b),s[b]=[]),s[b].push(j);let T=!1;return()=>{var A,$;T||(T=!0,s[b]=($=(A=s[b])===null||A===void 0?void 0:A.filter(W=>W!==j))!==null&&$!==void 0?$:[],s[b].length===0&&k(b))}},updateConfig:p,updateModel:w,disconnect:h}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var cv=class extends Event{constructor(t,s){super("error",s);je(this,"message");je(this,"error");this.message=t.message,this.error=t}},dv=class extends Event{constructor(t=1e3,s="",o){super("close",o);je(this,"code");je(this,"reason");je(this,"wasClean",!0);this.code=t,this.reason=s}},dc={Event,ErrorEvent:cv,CloseEvent:dv};function CC(n,t){if(!n)throw new Error(t)}function RC(n){return new n.constructor(n.type,n)}function TC(n){return"data"in n?new MessageEvent(n.type,n):"code"in n||"reason"in n?new dv(n.code||1999,n.reason||"unknown reason",n):"error"in n?new cv(n.error,n):new Event(n.type,n)}var ny,NC=typeof process<"u"&&typeof((ny=process.versions)==null?void 0:ny.node)<"u"&&typeof document>"u",La=NC?TC:RC,zr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},Bm=!1,PC=class Fr extends EventTarget{constructor(s,o,a={}){super();je(this,"_ws");je(this,"_retryCount",-1);je(this,"_uptimeTimeout");je(this,"_connectTimeout");je(this,"_shouldReconnect",!0);je(this,"_connectLock",!1);je(this,"_binaryType","blob");je(this,"_closeCalled",!1);je(this,"_messageQueue",[]);je(this,"_url");je(this,"_protocols");je(this,"_options");je(this,"onclose",null);je(this,"onerror",null);je(this,"onmessage",null);je(this,"onopen",null);je(this,"_handleOpen",s=>{this._debug("open event");const{minUptime:o=zr.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),o),CC(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(a=>{var u;return(u=this._ws)==null?void 0:u.send(a)}),this._messageQueue=[],this.onopen&&this.onopen(s),this.dispatchEvent(La(s))});je(this,"_handleMessage",s=>{this._debug("message event"),this.onmessage&&this.onmessage(s),this.dispatchEvent(La(s))});je(this,"_handleError",s=>{this._debug("error event",s.message),this._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(s),this._debug("exec error listeners"),this.dispatchEvent(La(s)),this._connect()});je(this,"_handleClose",s=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(s),this.dispatchEvent(La(s))});this._url=s,this._protocols=o,this._options=a,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Fr.CONNECTING}get OPEN(){return Fr.OPEN}get CLOSING(){return Fr.CLOSING}get CLOSED(){return Fr.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(s){this._binaryType=s,this._ws&&(this._ws.binaryType=s)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((o,a)=>(typeof a=="string"?o+=a.length:a instanceof Blob?o+=a.size:o+=a.byteLength,o),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Fr.CLOSED:Fr.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(s=1e3,o){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(s,o)}reconnect(s,o){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(s,o),this._connect())}send(s){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",s),this._ws.send(s);else{const{maxEnqueuedMessages:o=zr.maxEnqueuedMessages}=this._options;this._messageQueue.length",...s])}_getNextDelay(){const{reconnectionDelayGrowFactor:s=zr.reconnectionDelayGrowFactor,minReconnectionDelay:o=zr.minReconnectionDelay,maxReconnectionDelay:a=zr.maxReconnectionDelay}=this._options;let u=0;return this._retryCount>0&&(u=o*Math.pow(s,this._retryCount-1),u>a&&(u=a)),this._debug("next delay",u),u}_wait(){return new Promise(s=>{setTimeout(s,this._getNextDelay())})}_getNextProtocols(s){if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(typeof s=="function"){const o=s();if(!o)return Promise.resolve(null);if(typeof o=="string"||Array.isArray(o))return Promise.resolve(o);if(o.then)return o}throw Error("Invalid protocols")}_getNextUrl(s){if(typeof s=="string")return Promise.resolve(s);if(typeof s=="function"){const o=s();if(typeof o=="string")return Promise.resolve(o);if(o.then)return o}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:s=zr.maxRetries,connectionTimeout:o=zr.connectionTimeout}=this._options;if(this._retryCount>=s){this._debug("max retries reached",this._retryCount,">=",s);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([a,u])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!Bm&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),Bm=!0);const d=this._options.WebSocket||WebSocket;this._debug("connect",{url:a,protocols:u}),this._ws=u?new d(a,u):new d(a),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),o)}).catch(a=>{this._connectLock=!1,this._handleError(new dc.ErrorEvent(Error(a.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new dc.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(s=1e3,o){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(s,o),this._handleClose(new dc.CloseEvent(s,o,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var OC=n=>n[1]!==null&&n[1]!==void 0;function AC(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let n=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){let o=Math.random()*16;return n>0?(o=(n+o)%16|0,n=Math.floor(n/16)):(o=(t+o)%16|0,t=Math.floor(t/16)),(s==="x"?o:o&3|8).toString(16)})}function fv(n,t,s={}){const{host:o,path:a,protocol:u,room:d,party:h,query:p}=n;let m=o.replace(/^(http|https|ws|wss):\/\//,"");if(m.endsWith("/")&&(m=m.slice(0,-1)),a&&a.startsWith("/"))throw new Error("path must not start with a slash");const v=h??"main",w=a?`/${a}`:"",_=u||(m.startsWith("localhost:")||m.startsWith("127.0.0.1:")||m.startsWith("192.168.")||m.startsWith("10.")||m.startsWith("172.")&&m.split(".")[1]>="16"&&m.split(".")[1]<="31"||m.startsWith("[::ffff:7f00:1]:")?t:t+"s"),L=`${_}://${m}/${h?`parties/${h}`:"party"}/${d}${w}`,M=(x={})=>`${L}?${new URLSearchParams([...Object.entries(s),...Object.entries(x).filter(OC)])}`,k=typeof p=="function"?async()=>M(await p()):M(p);return{host:m,path:w,room:d,name:v,protocol:_,partyUrl:L,urlProvider:k}}var LC=class extends PC{constructor(t){const s=$m(t);super(s.urlProvider,s.protocols,s.socketOptions);je(this,"_pk");je(this,"_pkurl");je(this,"name");je(this,"room");je(this,"host");je(this,"path");this.partySocketOptions=t,this.setWSProperties(s)}updateProperties(t){const s=$m({...t,host:t.host??this.host,room:t.room??this.room,path:t.path??this.path});this._url=s.urlProvider,this._protocols=s.protocols,this._options=s.socketOptions,this.setWSProperties(s)}setWSProperties(t){const{_pk:s,_pkurl:o,name:a,room:u,host:d,path:h}=t;this._pk=s,this._pkurl=o,this.name=a,this.room=u,this.host=d,this.path=h}reconnect(t,s){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(t,s)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(t,s){const o=fv(t,"http"),a=typeof o.urlProvider=="string"?o.urlProvider:await o.urlProvider();return(t.fetch??fetch)(a,s)}};function $m(n){const{id:t,host:s,path:o,party:a,room:u,protocol:d,query:h,protocols:p,...m}=n,v=t||AC(),w=fv(n,"ws",{_pk:v});return{_pk:v,_pkurl:w.partyUrl,name:w.name,room:w.room,host:w.host,path:w.path,protocols:p,socketOptions:m,urlProvider:w.urlProvider}}const jC=1e3,IC=3e3;class DC{constructor(t,s,o,a,u){var d;this.onClose=u,this.listeners=new Set,this.heartbeat=null,this.id=(d=a==null?void 0:a.id)!==null&&d!==void 0?d:crypto.randomUUID();const h=new LC({host:o.host,party:t,room:s,id:this.id,query:()=>{const v=o.getAuthToken();return{app_id:o.appId,handler:t,...v?{token:v}:{},...o.functionsVersion?{fv:o.functionsVersion}:{}}}});this.ws=h;let p=Date.now();const m=()=>{p=Date.now()};h.addEventListener("open",m),h.addEventListener("message",v=>{m();let w;try{w=JSON.parse(v.data)}catch{return}if((w&&typeof w=="object"?w.type:void 0)!=="__pong")for(const L of this.listeners)L(w)}),this.heartbeat=setInterval(()=>{if(Date.now()-p>IC){m(),h.reconnect();return}try{h.send(JSON.stringify({type:"__ping"}))}catch{}},jC)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.ws.send(JSON.stringify(t))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function MC(n,t,s,o){let a=null;return{connect(u){if(a)return a;const d=new DC(n,t,s,u,()=>{o.delete(d),a===d&&(a=null)});return a=d,o.add(d),d}}}function zC(n,t){return n&&!n.startsWith("/")?n:t??n}function FC(n){const t=new Set;return{module:new Proxy({},{get(o,a){if(!(typeof a!="string"||a==="then"))return u=>MC(a,u,n,t)}}),closeAll:()=>{for(const o of[...t])o.close()}}}function UC(n){var t,s,o;const{serverUrl:a="https://base44.app",appId:u,token:d,serviceToken:h,requiresAuth:p=!1,appBaseUrl:m,options:v,functionsVersion:w,headers:_}=n,L=typeof m=="string"?m:"",M={serverUrl:a,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:u,token:d};let k=null;const x=()=>(k||(k=kC({config:M})),k),b={..._,"X-App-Id":String(u)},j=w?{...b,"Base44-Functions-Version":w}:b,T=Vo({baseURL:`${a}/api`,headers:b,token:d,onError:v==null?void 0:v.onError}),A=Vo({baseURL:`${a}/api`,headers:j,token:d,interceptResponses:!1,onError:v==null?void 0:v.onError}),$={...b,...d?{"on-behalf-of":`Bearer ${d}`}:{}},W=Vo({baseURL:`${a}/api`,headers:$,token:h,onError:v==null?void 0:v.onError}),G=Vo({baseURL:`${a}/api`,headers:j,token:h,interceptResponses:!1}),B=kk(T,A,u,{appBaseUrl:L});if(typeof window<"u"){const xe=d||Zr();xe&&B.setToken(xe)}const ie=FC({appId:u,host:zC(a,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:w,getAuthToken:()=>d||Zr()}),ue={entities:Nm({axios:T,appId:u,getSocket:x}),integrations:Pm(T,u),connectors:Tk(T,u),auth:B,functions:Om(A,u,{getAuthHeaders:()=>{const xe={},J=d||Zr();return J&&(xe.Authorization=`Bearer ${J}`),xe},baseURL:(s=A.defaults)===null||s===void 0?void 0:s.baseURL}),agents:Am({axios:T,getSocket:x,appId:u,serverUrl:a,token:d}),aiGateway:Lm({serverUrl:a,token:d,appId:u}),appLogs:jm(T,u),users:Pk(T,u),analytics:dk({axiosClient:T,serverUrl:a,appId:u,userAuthModule:B}),actors:ie.module,cleanup:()=>{ue.analytics.cleanup(),ie.closeAll(),k&&k.disconnect()}},Se={entities:Nm({axios:W,appId:u,getSocket:x}),integrations:Pm(W,u),sso:Ck(W,u),connectors:Rk(W,u),functions:Om(G,u,{getAuthHeaders:()=>{const xe={};return h&&(xe.Authorization=`Bearer ${h}`),xe},baseURL:(o=G.defaults)===null||o===void 0?void 0:o.baseURL}),agents:Am({axios:W,getSocket:x,appId:u,serverUrl:a,token:d}),aiGateway:Lm({serverUrl:a,token:h,appId:u}),appLogs:jm(W,u),cleanup:()=>{k&&k.disconnect()}};return p&&typeof window<"u"&&setTimeout(async()=>{try{await ue.auth.isAuthenticated()||ue.auth.redirectToLogin(window.location.href)}catch(xe){console.error("Authentication check failed:",xe),ue.auth.redirectToLogin(window.location.href)}},0),{...ue,setToken(xe){ue.auth.setToken(xe),k&&k.updateConfig({token:xe}),M.token=xe},getConfig(){return{serverUrl:a,appId:u,requiresAuth:p}},get asServiceRole(){if(!h)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return Se}}}const hv=typeof window>"u",BC=hv?{localStorage:new Map}:window,Go=BC.localStorage,$C=n=>n.replace(/([A-Z])/g,"_$1").toLowerCase(),Ls=(n,{defaultValue:t=void 0,removeFromUrl:s=!1}={})=>{if(hv)return t;const o=`base44_${$C(n)}`,a=new URLSearchParams(window.location.search),u=a.get(n);if(s){a.delete(n);const h=`${window.location.pathname}${a.toString()?`?${a.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,h)}if(u)return Go.setItem(o,u),u;if(t)return Go.setItem(o,t),t;const d=Go.getItem(o);return d||null},WC=()=>(Ls("clear_access_token")==="true"&&(Go.removeItem("base44_access_token"),Go.removeItem("token")),{appId:Ls("app_id",{defaultValue:"6a7b4d572a29fa810dbfbe5f"}),token:Ls("access_token",{removeFromUrl:!0}),fromUrl:Ls("from_url",{defaultValue:window.location.href}),functionsVersion:Ls("functions_version",{defaultValue:"prod"}),appBaseUrl:Ls("app_base_url",{defaultValue:void 0})}),qo={...WC()},{appId:VC,token:HC,functionsVersion:qC,appBaseUrl:QC}=qo,Qo=UC({appId:VC,token:HC,functionsVersion:qC,serverUrl:"",requiresAuth:!1,appBaseUrl:QC});function KC({}){var a;const t=Gs().pathname.substring(1),{data:s,isFetched:o}=KS({queryKey:["user"],queryFn:async()=>{try{return{user:await Qo.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return y.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:y.jsx("div",{className:"max-w-md w-full",children:y.jsxs("div",{className:"text-center space-y-6",children:[y.jsxs("div",{className:"space-y-2",children:[y.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),y.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),y.jsxs("div",{className:"space-y-3",children:[y.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),y.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",y.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),o&&s.isAuthenticated&&((a=s.user)==null?void 0:a.role)==="admin"&&y.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:y.jsxs("div",{className:"flex items-start space-x-3",children:[y.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:y.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),y.jsxs("div",{className:"text-left space-y-1",children:[y.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),y.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),y.jsx("div",{className:"pt-6",children:y.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[y.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const pv=E.createContext(),GC=({children:n})=>{const[t,s]=E.useState(null),[o,a]=E.useState(!1),[u,d]=E.useState(!0),[h,p]=E.useState(!0),[m,v]=E.useState(null),[w,_]=E.useState(!1),[L,M]=E.useState(null);E.useEffect(()=>{k()},[]);const k=async()=>{var T,A;try{p(!0),v(null);const $=Vo({baseURL:"/api/apps/public",headers:{"X-App-Id":qo.appId},token:qo.token,interceptResponses:!0});try{const W=await $.get(`/prod/public-settings/by-id/${qo.appId}`);M(W),qo.token?await x():(d(!1),a(!1),_(!0)),p(!1)}catch(W){if(console.error("App state check failed:",W),W.status===403&&((A=(T=W.data)==null?void 0:T.extra_data)!=null&&A.reason)){const G=W.data.extra_data.reason;v(G==="auth_required"?{type:"auth_required",message:"Authentication required"}:G==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:G,message:W.message})}else v({type:"unknown",message:W.message||"Failed to load app"});p(!1),d(!1)}}catch($){console.error("Unexpected error:",$),v({type:"unknown",message:$.message||"An unexpected error occurred"}),p(!1),d(!1)}},x=async()=>{try{d(!0);const T=await Qo.auth.me();s(T),a(!0),d(!1),_(!0)}catch(T){console.error("User auth check failed:",T),d(!1),a(!1),_(!0),(T.status===401||T.status===403)&&v({type:"auth_required",message:"Authentication required"})}},b=(T=!0)=>{s(null),a(!1),T?Qo.auth.logout(window.location.href):Qo.auth.logout()},j=()=>{Qo.auth.redirectToLogin(window.location.href)};return y.jsx(pv.Provider,{value:{user:t,isAuthenticated:o,isLoadingAuth:u,isLoadingPublicSettings:h,authError:m,appPublicSettings:L,authChecked:w,logout:b,navigateToLogin:j,checkUserAuth:x,checkAppState:k},children:n})},XC=()=>{const n=E.useContext(pv);if(!n)throw new Error("useAuth must be used within an AuthProvider");return n},YC=()=>y.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:y.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:y.jsxs("div",{className:"text-center",children:[y.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:y.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),y.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),y.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),y.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[y.jsx("p",{children:"If you believe this is an error, you can:"}),y.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[y.jsx("li",{children:"Verify you are logged in with the correct account"}),y.jsx("li",{children:"Contact the app administrator for access"}),y.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),JC=n=>{const t=n.slice(1);try{return decodeURIComponent(t)}catch{return t}};function ZC(){const{pathname:n,hash:t}=Gs(),s=kb();return E.useEffect(()=>{if(s!=="POP"){if(t){const o=JC(t),a=window.setTimeout(()=>{var u;(u=document.getElementById(o))==null||u.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(a)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[n,t,s]),null}const eR=[{label:"ABOUT",path:"/about"},{label:"PORTFOLIO",path:"/portfolio"},{label:"SUSTAINABILITY",path:"/sustainability",active:!0},{label:"INVESTORS",path:"/investors"},{label:"CONTACT",path:"/contact"}];function tR(){const[n,t]=E.useState(!1);return E.useEffect(()=>{const s=()=>t(window.scrollY>10);return window.addEventListener("scroll",s),()=>window.removeEventListener("scroll",s)},[]),y.jsxs(y.Fragment,{children:[y.jsx("header",{className:"sticky top-0 z-50 h-[72px] max-md:h-16 flex items-center",style:{background:n?"rgba(245, 240, 232, 0.85)":"var(--alrazah-parchment)",backdropFilter:n?"blur(12px)":"none",borderBottom:"1px solid rgba(10, 22, 40, 0.06)",transition:"background 0.3s ease, backdrop-filter 0.3s ease"},children:y.jsxs("div",{className:"mx-auto w-full max-w-[1440px] px-6 md:px-16 flex items-center justify-between",children:[y.jsxs(Br,{to:"/",className:"flex items-center gap-2",children:[y.jsx("span",{className:"font-display text-2xl font-medium tracking-tight text-alrazah-deep-navy",children:"ALRAZAH"}),y.jsx("span",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-alrazah-stone mt-1",children:"HOLDING"})]}),y.jsx("nav",{className:"hidden md:flex items-center gap-10",children:eR.map(s=>y.jsxs(Br,{to:s.path,className:"font-mono text-[13px] uppercase tracking-[0.06em] text-alrazah-deep-navy relative pb-1",style:{color:s.active?"var(--alrazah-deep-navy)":"var(--alrazah-slate)",fontWeight:s.active?600:500},children:[s.label,s.active&&y.jsx("span",{className:"absolute left-0 right-0 -bottom-0.5 h-[2px]",style:{background:"var(--alrazah-primary)"}})]},s.label))}),y.jsx("button",{className:"md:hidden font-mono text-[13px] uppercase tracking-[0.06em] text-alrazah-deep-navy",children:"Menu"})]})}),y.jsx("div",{className:"sticky top-[72px] max-md:top-16 z-40 h-12 hidden md:flex items-center",style:{background:"var(--alrazah-ivory)",borderBottom:"1px solid rgba(10, 22, 40, 0.06)"},children:y.jsxs("div",{className:"mx-auto w-full max-w-[1440px] px-16 flex items-center",children:[y.jsx(Br,{to:"/",className:"font-mono text-[12px] uppercase tracking-[0.04em] text-alrazah-stone",children:"Home"}),y.jsx("span",{className:"px-2 font-mono text-[12px] text-alrazah-gold",children:">"}),y.jsx(Br,{to:"/sustainability",className:"font-mono text-[12px] uppercase tracking-[0.04em] text-alrazah-stone",children:"Sustainability"}),y.jsx("span",{className:"px-2 font-mono text-[12px] text-alrazah-gold",children:">"}),y.jsx("span",{className:"font-mono text-[12px] uppercase tracking-[0.04em] font-semibold text-alrazah-deep-navy",children:"Community & Social Impact"})]})})]})}function nR(n){const[t,s]=E.useState(null);return E.useLayoutEffect(()=>{const o=n.current;if(!o)return;const a=o.getBoundingClientRect();s({width:a.width,height:a.height});const u=new ResizeObserver(([d])=>{const{width:h,height:p}=d.contentRect;s({width:h,height:p})});return u.observe(o),()=>u.disconnect()},[n]),t}const rR={"media.base44.com":"/images/public/","static.wixstatic.com":"/media/"},sR=1024,jn={OPTIMIZED:"optimized",ORIGINAL:"original",FALLBACK:"fallback"},oR=[1,2,3],iR=6e3;function aR(n){try{const t=new URL(n);if(t.protocol!=="https:"||t.username||t.password||t.port&&t.port!=="443")return null;const s=rR[t.hostname];if(!s)return null;const o=t.pathname.match(/^(.*)\/v1\/(?:fill|fit)\/[^/]+\/[^/]+$/i),a=o?o[1]:t.pathname,u=a.split("/").pop();return!a.startsWith(s)||!u||!/\.[a-z0-9]+$/i.test(u)||/\.svg$/i.test(u)?null:{baseUrl:`${t.origin}${a}`,filename:u}}catch{return null}}const Wm=n=>Math.min(Math.max(Math.round(n),1),iR),Vm=n=>Math.min(1,Math.max(0,n));function qc({baseUrl:n,filename:t},{width:s,height:o,crop:a,focalPoint:u,quality:d}){const h=[`w_${Wm(s)}`,`h_${Wm(o||s)}`];a&&h.push(u?`fp_${Vm(u.x).toFixed(2)}_${Vm(u.y).toFixed(2)}`:"al_c"),h.push(`q_${d}`,"usm_0.66_1.00_0.01","enc_webp","quality_auto");const p=/\.gif$/i.test(t)?t:t.replace(/\.[a-z0-9]+$/i,"")+".webp";return`${n}/v1/${a?"fill":"fit"}/${h.join(",")}/${p}`}function lR(n,t){return oR.map(s=>`${qc(n,{...t,width:t.width*s,height:t.height?t.height*s:void 0})} ${s}x`).join(", ")}function uR(n,t){return(t==null?void 0:t.baseUrl)||n}function cR(n){return n===jn.OPTIMIZED?jn.ORIGINAL:jn.FALLBACK}const fc="https://static.wixstatic.com/media/12d367_4f26ccd17f8f4e3a8958306ea08c2332~mv2.png",mv=E.forwardRef(({aspectRatio:n,className:t,style:s,children:o},a)=>y.jsx("span",{ref:a,className:Er("inline-block relative",t),style:{aspectRatio:n,...s},children:o}));mv.displayName="ImageWrapper";const yv=E.forwardRef(({parsed:n,fittingType:t,focalPoint:s,quality:o,className:a,style:u,aspectRatio:d,onLoad:h,...p},m)=>{const v=E.useRef(null),w=E.useRef(null),_=nR(v),[L,M]=E.useState(!1);E.useImperativeHandle(m,()=>w.current),E.useEffect(()=>{M(!1)},[n.baseUrl]);const k=t!=="fit",x=_&&{width:_.width||sR,height:_.height?_.height:void 0,crop:k,focalPoint:k?s:void 0,quality:o};return y.jsxs(mv,{ref:v,aspectRatio:d,className:a,style:u,children:[x&&!L&&y.jsx("img",{src:qc(n,{...x,width:20,height:x.height?Math.max(1,Math.round(20*x.height/x.width)):void 0,quality:20}),alt:"","aria-hidden":"true",className:"w-full h-full inset-0 absolute",style:{objectFit:t==="fit"?"contain":"cover",filter:"blur(10px)",transform:"scale(1.1)"}}),x&&y.jsx("img",{ref:w,src:qc(n,x),srcSet:lR(n,x),loading:"lazy",className:Er("w-full h-full inset-0 absolute",t==="fit"?"object-contain":"object-cover"),onLoad:b=>{M(!0),h==null||h(b)},...p})]})});yv.displayName="ResponsiveImage";const Sr=E.forwardRef(({src:n,fittingType:t="fill",originWidth:s,originHeight:o,focalPointX:a,focalPointY:u,quality:d=90,onError:h,...p},m)=>{const v=n&&n!==fc?aR(n):null,w=v?jn.OPTIMIZED:jn.ORIGINAL,[_,L]=E.useState({src:n,mode:w}),M=_.src===n?_.mode:w;E.useEffect(()=>{L({src:n,mode:w})},[n,w]);const x={...p,onError:A=>{if(M===jn.FALLBACK)return;const $=cR(M);L({src:n,mode:$}),$===jn.FALLBACK&&(h==null||h(A))}};if(!n)return y.jsx("img",{ref:m,src:fc,...x,"data-empty-image":!0});const b=M===jn.OPTIMIZED?v:null;if(!b){const A=M===jn.FALLBACK,$=A?fc:uR(n,v);return y.jsx("img",{ref:m,src:$,...x,"data-error-image":A||void 0})}const j=typeof a=="number"&&typeof u=="number"?{x:a,y:u}:void 0,T=s&&o?`${s} / ${o}`:void 0;return y.jsx(yv,{ref:m,parsed:b,fittingType:t,focalPoint:j,quality:d,aspectRatio:T,...x})});Sr.displayName="Image";function gv(n={}){const t=E.useRef(null),[s,o]=E.useState(!1);return E.useEffect(()=>{const a=t.current;if(!a)return;if(typeof IntersectionObserver>"u"){o(!0);return}const u=new IntersectionObserver(([d])=>{d.isIntersecting&&(o(!0),u.unobserve(d.target))},{threshold:.15,...n});return u.observe(a),()=>u.disconnect()},[]),{ref:t,visible:s}}function Me({children:n,delay:t=0,className:s="",as:o="div"}){const{ref:a,visible:u}=gv();return y.jsx(o,{ref:a,className:s,style:{opacity:u?1:0,transform:u?"translateY(0)":"translateY(24px)",transition:`opacity 0.6s ease ${t}s, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) ${t}s`},children:n})}const dR=[{label:"Workforce",value:"4,200+"},{label:"Qatari Nationals",value:"78%"},{label:"WPS Compliance",value:"100%"},{label:"LTIFR",value:"0.00"}];function fR(){return y.jsx("section",{className:"relative",style:{background:"linear-gradient(135deg, #8D0034 0%, #6B0028 100%)",paddingTop:"clamp(6rem, 12vw, 8rem)",paddingBottom:"clamp(5rem, 10vw, 6rem)"},children:y.jsxs("div",{className:"mx-auto w-full max-w-[1440px] px-6 md:px-16",children:[y.jsxs("div",{className:"grid lg:grid-cols-[55%_45%] gap-8 lg:gap-16 items-center",children:[y.jsxs("div",{children:[y.jsx(Me,{children:y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.08em] mb-4",style:{color:"var(--alrazah-gold)"},children:"Social Stewardship"})}),y.jsx(Me,{delay:.08,children:y.jsx("h1",{className:"font-display text-[clamp(3rem,5vw,4.5rem)] leading-[1.05] tracking-[-0.02em] mb-8",style:{color:"var(--alrazah-parchment)",fontWeight:400},children:"People at the Center"})}),y.jsx(Me,{delay:.16,children:y.jsx("p",{className:"text-base md:text-[18px] leading-[1.65] max-w-[54ch] mb-12",style:{color:"var(--alrazah-parchment)",opacity:.9},children:"Alrazah Holding's social strategy is governed by the same discipline as its financial strategy. We measure workforce protection, community integration, and supply chain ethics with the same rigour as return on equity. Every project is evaluated against its impact on the people who build it, the communities that surround it, and the national workforce it develops."})}),y.jsx(Me,{delay:.24,children:y.jsx("div",{className:"flex flex-wrap gap-x-12 gap-y-6",children:dR.map(n=>y.jsxs("div",{children:[y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.06em] mb-2",style:{color:"var(--alrazah-gold)"},children:n.label}),y.jsx("p",{className:"font-mono text-2xl md:text-[28px] font-medium",style:{color:"var(--alrazah-parchment)"},children:n.value}),y.jsx("div",{className:"mt-2 h-[2px] w-8",style:{background:"var(--alrazah-gold)"}})]},n.label))})})]}),y.jsx(Me,{delay:.2,children:y.jsxs("div",{className:"border",style:{borderColor:"rgba(245,240,232,0.15)"},children:[y.jsx("div",{className:"aspect-[4/5] overflow-hidden",children:y.jsx(Sr,{src:"https://media.base44.com/images/public/6a7b4d572a29fa810dbfbe5f/7a5710343_generated_f04c2823.png",alt:"Diverse professional workforce in Qatar with Qatari leadership",fittingType:"fill",className:"w-full h-full"})}),y.jsx("div",{className:"h-11 flex items-center px-5",style:{background:"rgba(245,240,232,0.08)"},children:y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.04em]",style:{color:"var(--alrazah-parchment)",opacity:.7},children:"Ras Laffan Integrated Logistics Park — Multinational Workforce, Qatari Leadership"})})]})})]}),y.jsx("div",{className:"mt-12 lg:mt-24 h-px w-full",style:{background:"var(--alrazah-gold)",opacity:.4}})]})})}const hR=[{icon:m1,framework:"GRI 401",value:"4,200+",label:"Total Workforce (Direct & Contracted)",context:"Across 6 active developments and 3 operational assets"},{icon:Vx,framework:"GRI 412",value:"78%",label:"Qatari Nationals in Management",context:"Exceeds 60% Qatarization target for sector"},{icon:Dy,framework:"GRI 403",value:"0.00",label:"Lost Time Injury Frequency Rate",context:"3 consecutive years; target maintained"},{icon:Jx,framework:"GRI 413",value:"100%",label:"Wage Protection System Compliance",context:"All Tier 1 and Tier 2 contractors enrolled"}];function pR(){return y.jsx("section",{className:"py-16 md:py-24",style:{background:"var(--alrazah-primary-light)"},children:y.jsxs("div",{className:"mx-auto w-full max-w-[1440px] px-6 md:px-16",children:[y.jsxs(Me,{className:"mb-12 md:mb-16",children:[y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.06em] mb-3",style:{color:"var(--alrazah-primary)"},children:"2026 Social Scorecard"}),y.jsx("h2",{className:"font-display text-[clamp(2.25rem,4vw,3.5rem)] leading-[1.1] tracking-[-0.015em]",style:{color:"var(--alrazah-deep-navy)",fontWeight:400},children:"Workforce & Community Performance"})]}),y.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:hR.map((n,t)=>{const s=n.icon;return y.jsx(Me,{delay:t*.08,children:y.jsxs("div",{className:"group p-8 h-full transition-all duration-300 hover:-translate-y-0.5",style:{background:"var(--alrazah-parchment)",border:"1px solid rgba(141,0,52,0.08)"},children:[y.jsxs("div",{className:"flex items-center justify-between mb-6",children:[y.jsx(s,{className:"w-8 h-8",style:{color:"var(--alrazah-primary)"},strokeWidth:1.5}),y.jsx("span",{className:"font-mono text-[12px] uppercase tracking-[0.04em] h-6 px-2.5 flex items-center",style:{background:"rgba(141,0,52,0.08)",border:"1px solid rgba(141,0,52,0.12)",color:"var(--alrazah-primary)"},children:n.framework})]}),y.jsx("p",{className:"font-mono text-[clamp(2.25rem,4vw,3.5rem)] leading-none mb-2",style:{color:"var(--alrazah-deep-navy)",fontWeight:500},children:n.value}),y.jsx("p",{className:"text-sm leading-[1.6]",style:{color:"var(--alrazah-slate)"},children:n.label}),y.jsx("div",{className:"my-6 h-px w-full",style:{background:"rgba(141,0,52,0.06)"}}),y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.04em] leading-[1.5]",style:{color:"var(--alrazah-stone)"},children:n.context})]})},n.label)})})]})})}const mR=[["Wage Protection System","Mandatory","100% Tier 1 & 2 enrollment"],["Accommodation","Basic standard","Max 4 persons/room; A/C 24hr; kitchen facilities"],["Working Hours","8 hrs/day + overtime","Max 60 hrs/week; voluntary OT only"],["Annual Leave","3 weeks","4 weeks + paid repatriation flight"],["End-of-Service","Statutory","Statutory + 10% Alrazah supplement"],["Medical Insurance","Employer-provided","Family coverage included"]],Hm=[{label:"Qatari Nationals",pct:78,color:"var(--alrazah-primary)"},{label:"Arab Nationals",pct:8,color:"var(--alrazah-gold)"},{label:"South Asian",pct:10,color:"var(--alrazah-slate)"},{label:"Other",pct:4,color:"var(--alrazah-stone)"}];function yR(){return y.jsx("section",{className:"py-16 md:py-24 lg:py-32",style:{background:"var(--alrazah-parchment)"},children:y.jsxs("div",{className:"mx-auto w-full max-w-[1440px] px-6 md:px-16",children:[y.jsxs(Me,{className:"mb-16 md:mb-20",children:[y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.06em] mb-3",style:{color:"var(--alrazah-primary)"},children:"Workforce Protection"}),y.jsx("h2",{className:"font-display text-[clamp(2.25rem,4vw,3.5rem)] leading-[1.1] tracking-[-0.015em] mb-6",style:{color:"var(--alrazah-deep-navy)",fontWeight:400},children:"The People Who Build Our Assets"}),y.jsx("p",{className:"text-base md:text-[18px] leading-[1.65] max-w-[58ch]",style:{color:"var(--alrazah-slate)"},children:"Alrazah Holding's Worker Welfare Policy exceeds Qatari Labour Law minima on accommodation, wages, working hours, and repatriation rights. All contractors and subcontractors are contractually bound to these standards, with independent audit verification."})]}),y.jsxs("div",{className:"grid lg:grid-cols-[55%_45%] gap-8 lg:gap-16 items-start",children:[y.jsxs(Me,{children:[y.jsx("div",{className:"overflow-x-auto",children:y.jsxs("table",{className:"w-full border-collapse",style:{border:"1px solid rgba(10,22,40,0.08)"},children:[y.jsx("thead",{children:y.jsx("tr",{style:{background:"var(--alrazah-primary)"},children:["Standard","QLL Minimum","Alrazah Requirement","Status"].map(n=>y.jsx("th",{scope:"col",className:"font-mono text-[12px] uppercase tracking-[0.04em] text-left px-5 py-3 font-medium",style:{color:"var(--alrazah-parchment)"},children:n},n))})}),y.jsx("tbody",{children:mR.map((n,t)=>y.jsxs("tr",{className:"transition-colors duration-200",style:{background:t%2===0?"var(--alrazah-parchment)":"var(--alrazah-ivory)",borderBottom:"1px solid rgba(10,22,40,0.06)"},children:[y.jsx("td",{className:"px-5 py-3.5 text-sm font-medium",style:{color:"var(--alrazah-deep-navy)"},children:n[0]}),y.jsx("td",{className:"px-5 py-3.5 text-sm",style:{color:"var(--alrazah-slate)"},children:n[1]}),y.jsx("td",{className:"px-5 py-3.5 text-sm",style:{color:"var(--alrazah-deep-navy)"},children:n[2]}),y.jsx("td",{className:"px-5 py-3.5",children:y.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[y.jsx(Iy,{className:"w-4 h-4",style:{color:"var(--alrazah-success)"},strokeWidth:2.5}),y.jsx("span",{className:"font-mono text-[12px] uppercase tracking-[0.04em]",style:{color:"var(--alrazah-success)"},children:"Compliant"})]})})]},n[0]))})]})}),y.jsxs("div",{className:"mt-8 p-8",style:{borderLeft:"3px solid var(--alrazah-primary)",background:"var(--alrazah-primary-light)"},children:[y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.06em] mb-3",style:{color:"var(--alrazah-primary)"},children:"Independent Verification"}),y.jsx("p",{className:"text-sm leading-[1.6] mb-4",style:{color:"var(--alrazah-slate)"},children:"All contractor welfare compliance is verified by quarterly independent audits conducted by a Big Four firm. Findings are reported to the Board ESG Committee and disclosed to the Qatar Stock Exchange."}),y.jsx("p",{className:"font-mono text-sm font-medium",style:{color:"var(--alrazah-primary)"},children:"Last Audit: Q2 2026 | Zero Critical Findings"})]})]}),y.jsxs(Me,{delay:.12,children:[y.jsxs("div",{className:"p-8",style:{background:"var(--alrazah-ivory)",border:"1px solid rgba(10,22,40,0.06)"},children:[y.jsx("h3",{className:"text-xl font-semibold mb-6",style:{color:"var(--alrazah-deep-navy)"},children:"Workforce Composition"}),y.jsx("div",{className:"flex h-6 w-full overflow-hidden",style:{background:"rgba(10,22,40,0.06)"},role:"img","aria-label":"Workforce composition",children:Hm.map(n=>y.jsx("div",{style:{width:`${n.pct}%`,background:n.color}},n.label))}),y.jsx("div",{className:"mt-4 space-y-2",children:Hm.map(n=>y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("span",{className:"w-2.5 h-2.5 inline-block",style:{background:n.color}}),y.jsxs("span",{className:"font-mono text-[12px] uppercase tracking-[0.04em]",style:{color:"var(--alrazah-stone)"},children:[n.label," — ",n.pct,"%"]})]},n.label))}),y.jsxs("button",{className:"mt-8 h-11 px-6 font-mono text-[12px] uppercase tracking-[0.06em] inline-flex items-center gap-2 transition-all duration-300",style:{border:"1px solid var(--alrazah-primary)",color:"var(--alrazah-primary)"},onMouseEnter:n=>{n.currentTarget.style.background="var(--alrazah-primary)",n.currentTarget.style.color="var(--alrazah-parchment)"},onMouseLeave:n=>{n.currentTarget.style.background="transparent",n.currentTarget.style.color="var(--alrazah-primary)"},children:[y.jsx(Ux,{className:"w-4 h-4",strokeWidth:1.5})," Download Workforce Report [PDF]"]})]}),y.jsxs("div",{className:"mt-5 p-8",style:{background:"var(--alrazah-ivory)",border:"1px solid rgba(10,22,40,0.06)"},children:[y.jsx("h3",{className:"text-xl font-semibold mb-4",style:{color:"var(--alrazah-deep-navy)"},children:"Worker Grievance Channel"}),y.jsx("p",{className:"text-sm leading-[1.6] mb-4",style:{color:"var(--alrazah-slate)"},children:"A confidential, multilingual hotline and digital portal is available to all workers across Alrazah Holding's contractor network. Grievances are escalated to the Executive ESG Officer within 48 hours."}),y.jsx("p",{className:"font-mono text-sm font-medium mb-4",style:{color:"var(--alrazah-primary)"},children:"Avg. Resolution Time: 5.2 Days"}),y.jsxs("button",{className:"font-mono text-[12px] uppercase tracking-[0.06em] inline-flex items-center gap-1.5 underline-offset-4 hover:underline",style:{color:"var(--alrazah-primary)"},children:["Access Grievance Portal ",y.jsx(Ix,{className:"w-3.5 h-3.5",strokeWidth:1.5})]})]})]})]})]})})}const gR=[{num:"01",icon:h1,title:"Management Qatarization",body:"78% of managerial and senior technical positions held by Qatari nationals, exceeding the 60% sector target set by the Qatar Ministry of Labour.",pct:78,target:60,exceeded:!0},{num:"02",icon:Kx,title:"Vocational Training",body:"1,240 training hours delivered to Qatari nationals in 2025 through partnerships with Community College of Qatar, Qatar Foundation, and internal mentorship programs.",pct:124,target:100,exceeded:!0},{num:"03",icon:u1,title:"Leadership Pipeline",body:"12 Qatari nationals enrolled in the Alrazah Leadership Programme, a 24-month rotation across real estate, logistics, and asset management functions.",pct:80,target:100,exceeded:!1}];function vR({pct:n,target:t,exceeded:s,visible:o}){const a=Math.min(n,t);return y.jsxs("div",{children:[y.jsxs("div",{className:"h-1.5 w-full overflow-hidden relative",style:{background:"rgba(10,22,40,0.06)"},role:"progressbar","aria-valuenow":n,"aria-valuemax":t,children:[y.jsx("div",{className:"h-full",style:{width:o?`${a}%`:"0%",background:"var(--alrazah-primary)",transition:"width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94)"}}),s&&y.jsx("div",{className:"h-full absolute top-0",style:{left:`${a}%`,width:o?`${n-t}%`:"0%",background:"var(--alrazah-success)",transition:"width 0.3s ease 1.2s"}})]}),y.jsxs("p",{className:"mt-2 font-mono text-[12px] uppercase tracking-[0.04em]",style:{color:"var(--alrazah-stone)"},children:[n,"% of ",t,"% target ",s?"(exceeded)":""]})]})}function wR(){const{ref:n,visible:t}=gv();return y.jsx("section",{className:"pt-16 md:pt-24 pb-20 md:pb-32",style:{background:"var(--alrazah-ivory)"},children:y.jsxs("div",{className:"mx-auto w-full max-w-[1440px] px-6 md:px-16",children:[y.jsxs(Me,{className:"text-center mb-16 md:mb-20",children:[y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.06em] mb-3",style:{color:"var(--alrazah-gold)"},children:"Human Development"}),y.jsx("h2",{className:"font-display text-[clamp(2.25rem,4vw,3.5rem)] leading-[1.1] tracking-[-0.015em] mb-6",style:{color:"var(--alrazah-deep-navy)",fontWeight:400},children:"Building Qatari Leadership"}),y.jsx("p",{className:"text-base md:text-[18px] leading-[1.65] max-w-[64ch] mx-auto",style:{color:"var(--alrazah-slate)"},children:"Qatarization is not a quota. It is a strategic investment in national human capital. Alrazah Holding targets 60% Qatari national representation in managerial and technical roles, with structured training, mentorship, and leadership pipeline programs."})]}),y.jsx("div",{ref:n,className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:gR.map((s,o)=>{const a=s.icon;return y.jsx(Me,{delay:o*.1,children:y.jsxs("div",{className:"group p-8 lg:p-12 h-full transition-all duration-300 hover:-translate-y-0.5",style:{background:"var(--alrazah-parchment)",border:"1px solid rgba(10,22,40,0.06)"},children:[y.jsx("p",{className:"font-display text-[clamp(3rem,5vw,4.5rem)] leading-none mb-4 font-bold",style:{color:"var(--alrazah-gold)",opacity:.3},children:s.num}),y.jsx(a,{className:"w-10 h-10 mb-5",style:{color:"var(--alrazah-primary)"},strokeWidth:1.5}),y.jsx("h3",{className:"text-2xl font-semibold mb-4",style:{color:"var(--alrazah-deep-navy)"},children:s.title}),y.jsx("p",{className:"text-sm leading-[1.6]",style:{color:"var(--alrazah-slate)"},children:s.body}),y.jsx("div",{className:"mt-5",children:y.jsx(vR,{pct:s.pct,target:s.target,exceeded:s.exceeded,visible:t})})]})},s.num)})})]})})}const xR=[{value:"15%",label:"Affordable Housing Allocation"},{value:"12,000 SQM",label:"Public Realm Contribution"},{value:"8",label:"Community Consultations Held"},{value:"QAR 86M",label:"Local SME Contract Value"}],SR=[{icon:e1,title:"Affordable Housing Integration",desc:"All residential developments allocate 15% of units to affordable housing per Qatari regulatory requirements, with integrated design standards."},{icon:a1,title:"Public Realm & Open Space",desc:"12,000 sqm of publicly accessible open space, walkways, and community facilities integrated into mixed-use developments."},{icon:s1,title:"Community Consultation",desc:"Mandatory community consultation during design development for all residential and mixed-use projects. Feedback incorporated into final plans."}];function bR(){return y.jsx("section",{className:"py-16 md:py-24 lg:py-32",style:{background:"var(--alrazah-parchment)"},children:y.jsx("div",{className:"mx-auto w-full max-w-[1440px] px-6 md:px-16",children:y.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 lg:gap-16 items-start",children:[y.jsxs("div",{children:[y.jsxs(Me,{children:[y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.08em] mb-4",style:{color:"var(--alrazah-primary)"},children:"Community Stewardship"}),y.jsx("h2",{className:"font-display text-[clamp(2.25rem,4vw,3.5rem)] leading-[1.1] tracking-[-0.015em] mb-5",style:{color:"var(--alrazah-deep-navy)",fontWeight:400},children:"Assets That Serve Their Neighbours"}),y.jsx("p",{className:"text-base md:text-[18px] leading-[1.65] max-w-[54ch] mb-10",style:{color:"var(--alrazah-slate)"},children:"Alrazah Holding's developments are designed with community access, public realm quality, and inclusive amenity provision as primary design drivers. We do not build walls around our assets. We build connections through them."})]}),y.jsx(Me,{delay:.1,children:y.jsx("div",{className:"grid grid-cols-2 gap-6 mb-10",children:xR.map(n=>y.jsxs("div",{children:[y.jsx("p",{className:"font-mono text-2xl md:text-[28px] font-medium",style:{color:"var(--alrazah-deep-navy)"},children:n.value}),y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.04em] mt-1",style:{color:"var(--alrazah-stone)"},children:n.label})]},n.label))})}),y.jsx("div",{className:"space-y-6",children:SR.map((n,t)=>{const s=n.icon;return y.jsx(Me,{delay:.14+t*.08,children:y.jsxs("div",{className:"flex gap-4 items-start",children:[y.jsx("div",{className:"w-12 h-12 flex items-center justify-center shrink-0",style:{background:"var(--alrazah-primary-light)",border:"1px solid rgba(141,0,52,0.08)"},children:y.jsx(s,{className:"w-6 h-6",style:{color:"var(--alrazah-primary)"},strokeWidth:1.5})}),y.jsxs("div",{children:[y.jsx("h4",{className:"text-xl font-semibold mb-1",style:{color:"var(--alrazah-deep-navy)"},children:n.title}),y.jsx("p",{className:"text-sm leading-[1.6]",style:{color:"var(--alrazah-slate)"},children:n.desc})]})]})},n.title)})})]}),y.jsx(Me,{delay:.15,children:y.jsxs("div",{className:"space-y-4",children:[y.jsx("div",{className:"aspect-[4/3] overflow-hidden border",style:{borderColor:"rgba(10,22,40,0.08)"},children:y.jsx(Sr,{src:"https://media.base44.com/images/public/6a7b4d572a29fa810dbfbe5f/591e34161_generated_1b61d8bf.png",alt:"Public courtyard within an Alrazah development in use",fittingType:"fill",className:"w-full h-full transition-transform duration-[600ms] hover:scale-[1.03]"})}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx("div",{className:"aspect-square overflow-hidden border",style:{borderColor:"rgba(10,22,40,0.08)"},children:y.jsx(Sr,{src:"https://media.base44.com/images/public/6a7b4d572a29fa810dbfbe5f/a20fbc698_generated_4afb23aa.png",alt:"Community consultation meeting",fittingType:"fill",className:"w-full h-full transition-transform duration-[600ms] hover:scale-[1.03]"})}),y.jsx("div",{className:"aspect-square overflow-hidden border",style:{borderColor:"rgba(10,22,40,0.08)"},children:y.jsx(Sr,{src:"https://media.base44.com/images/public/6a7b4d572a29fa810dbfbe5f/550115976_generated_b7da79d4.png",alt:"Public realm landscaping",fittingType:"fill",className:"w-full h-full transition-transform duration-[600ms] hover:scale-[1.03]"})})]}),y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.04em]",style:{color:"var(--alrazah-stone)"},children:"Al Wukair Residential Complex — Public courtyard and community access walkway."})]})})]})})})}const ER=[{icon:Dy,value:"0.00",label:"Lost Time Injury Frequency Rate",context:"3 consecutive years; construction + operations"},{icon:Xx,value:"12,400+",label:"Safety Training Hours Delivered",context:"2025; all workers including subcontractors"},{icon:d1,value:"100%",label:"Near-Miss Reporting Coverage",context:"All active sites; digital + verbal channels"},{icon:zx,value:"48",label:"Safety Audits Conducted",context:"2025; internal + independent combined"}],_R=[{title:"Mandatory PPE",desc:"Zero exceptions on all sites"},{title:"Heat Stress Protocol",desc:"Work suspension >45°C"},{title:"Emergency Response",desc:"On-site medical stations"},{title:"Subcontractor Binding",desc:"Safety clauses in all contracts"}];function kR(){return y.jsx("section",{className:"py-16 md:py-24 lg:py-32",style:{background:"var(--alrazah-primary)"},children:y.jsxs("div",{className:"mx-auto w-full max-w-[1440px] px-6 md:px-16",children:[y.jsxs(Me,{className:"text-center mb-16 md:mb-20",children:[y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.08em] mb-3",style:{color:"var(--alrazah-gold)"},children:"Health & Safety"}),y.jsx("h2",{className:"font-display text-[clamp(2.25rem,4vw,3.5rem)] leading-[1.1] tracking-[-0.015em] mb-6",style:{color:"var(--alrazah-parchment)",fontWeight:400},children:"Zero Harm Is the Only Acceptable Target"}),y.jsx("p",{className:"text-base md:text-[18px] leading-[1.65] max-w-[64ch] mx-auto",style:{color:"var(--alrazah-parchment)",opacity:.85},children:"Alrazah Holding maintains a zero-tolerance policy for workplace injuries. Our Lost Time Injury Frequency Rate (LTIFR) has remained at 0.00 for three consecutive years across all operational and construction activities."})]}),y.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:ER.map((n,t)=>{const s=n.icon;return y.jsx(Me,{delay:t*.08,children:y.jsxs("div",{className:"p-8 h-full transition-all duration-300",style:{background:"rgba(245,240,232,0.04)",border:"1px solid rgba(245,240,232,0.1)"},children:[y.jsx(s,{className:"w-8 h-8 mb-6",style:{color:"var(--alrazah-gold)"},strokeWidth:1.5}),y.jsx("p",{className:"font-mono text-[clamp(2.25rem,4vw,3.5rem)] leading-none mb-2",style:{color:"var(--alrazah-parchment)"},children:n.value}),y.jsx("p",{className:"text-sm leading-[1.6]",style:{color:"var(--alrazah-parchment)",opacity:.8},children:n.label}),y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.04em] mt-3",style:{color:"var(--alrazah-parchment)",opacity:.6},children:n.context})]})},n.label)})}),y.jsx(Me,{delay:.2,children:y.jsx("div",{className:"mt-16 md:mt-20 flex flex-wrap justify-center gap-x-12 gap-y-8",children:_R.map(n=>y.jsxs("div",{className:"text-center max-w-[200px]",children:[y.jsx("div",{className:"w-6 h-6 mx-auto mb-3",style:{background:"var(--alrazah-gold)"}}),y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.04em] font-medium",style:{color:"var(--alrazah-parchment)"},children:n.title}),y.jsx("p",{className:"font-mono text-[12px] tracking-[0.04em] mt-2",style:{color:"var(--alrazah-parchment)",opacity:.7},children:n.desc})]},n.title))})})]})})}const CR=[{icon:n1,value:"QAR 86M",label:"Local SME Contract Value",body:"68% of eligible procurement spend directed to Qatari-registered SMEs, exceeding the 50% national target for government-linked projects."},{icon:$x,value:"47",label:"Audited Suppliers",body:"All Tier 1 and Tier 2 suppliers pre-qualified under Alrazah’s vendor governance framework. Annual ESG audits mandatory."},{icon:qx,value:"94%",label:"ESG Compliance Rate",body:"Supplier ESG attestation coverage across environmental, labour, and anti-corruption criteria. 6% under remediation."}],RR=[["General Contractors","8","100%","72%","COMPLIANT"],["MEP Contractors","6","100%","58%","COMPLIANT"],["Material Suppliers","18","94%","45%","REMEDIATION"],["Professional Services","12","100%","85%","COMPLIANT"],["Logistics Providers","3","100%","60%","COMPLIANT"]];function TR(){return y.jsx("section",{className:"pt-16 md:pt-24 pb-20 md:pb-32",style:{background:"var(--alrazah-ivory)"},children:y.jsxs("div",{className:"mx-auto w-full max-w-[1440px] px-6 md:px-16",children:[y.jsxs(Me,{className:"mb-16 md:mb-20",children:[y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.06em] mb-3",style:{color:"var(--alrazah-primary)"},children:"Supply Chain Governance"}),y.jsx("h2",{className:"font-display text-[clamp(2.25rem,4vw,3.5rem)] leading-[1.1] tracking-[-0.015em] mb-6",style:{color:"var(--alrazah-deep-navy)",fontWeight:400},children:"Ethical Procurement"}),y.jsx("p",{className:"text-base md:text-[18px] leading-[1.65] max-w-[58ch]",style:{color:"var(--alrazah-slate)"},children:"Our procurement framework requires ESG compliance from all Tier 1 and Tier 2 suppliers, including anti-modern slavery attestations, environmental compliance certificates, and local content verification."})]}),y.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:CR.map((n,t)=>{const s=n.icon;return y.jsx(Me,{delay:t*.1,children:y.jsxs("div",{className:"p-8 lg:p-12 h-full transition-all duration-300 hover:-translate-y-0.5",style:{background:"var(--alrazah-parchment)",border:"1px solid rgba(10,22,40,0.06)"},children:[y.jsx(s,{className:"w-10 h-10 mb-8",style:{color:"var(--alrazah-primary)"},strokeWidth:1.5}),y.jsx("p",{className:"font-mono text-2xl md:text-[28px] font-medium mb-2",style:{color:"var(--alrazah-deep-navy)"},children:n.value}),y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.04em] mb-4",style:{color:"var(--alrazah-stone)"},children:n.label}),y.jsx("p",{className:"text-sm leading-[1.6]",style:{color:"var(--alrazah-slate)"},children:n.body})]})},n.label)})}),y.jsx(Me,{delay:.15,children:y.jsx("div",{className:"mt-16 md:mt-20 overflow-x-auto",children:y.jsxs("table",{className:"w-full border-collapse",style:{border:"1px solid rgba(10,22,40,0.08)"},children:[y.jsx("thead",{children:y.jsx("tr",{style:{background:"var(--alrazah-primary)"},children:["Supplier Category","Count","ESG Audited","Local Content","Status"].map(n=>y.jsx("th",{scope:"col",className:"font-mono text-[12px] uppercase tracking-[0.04em] text-left px-5 py-3 font-medium",style:{color:"var(--alrazah-parchment)"},children:n},n))})}),y.jsx("tbody",{children:RR.map((n,t)=>{const s=n[4]==="REMEDIATION";return y.jsxs("tr",{className:"transition-colors duration-200",style:{background:t%2===0?"var(--alrazah-parchment)":"var(--alrazah-ivory)",borderBottom:"1px solid rgba(10,22,40,0.06)"},children:[y.jsx("td",{className:"px-5 py-3.5 text-sm font-medium",style:{color:"var(--alrazah-deep-navy)"},children:n[0]}),y.jsx("td",{className:"px-5 py-3.5 font-mono text-sm",style:{color:"var(--alrazah-deep-navy)"},children:n[1]}),y.jsx("td",{className:"px-5 py-3.5 font-mono text-sm",style:{color:"var(--alrazah-deep-navy)"},children:n[2]}),y.jsx("td",{className:"px-5 py-3.5 font-mono text-sm",style:{color:"var(--alrazah-deep-navy)"},children:n[3]}),y.jsx("td",{className:"px-5 py-3.5",children:y.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[!s&&y.jsx(Iy,{className:"w-4 h-4",style:{color:"var(--alrazah-success)"},strokeWidth:2.5}),y.jsx("span",{className:"font-mono text-[12px] uppercase tracking-[0.04em]",style:{color:s?"var(--alrazah-warning)":"var(--alrazah-success)"},children:n[4]})]})})]},n[0])})})]})})})]})})}const NR=[{value:"3,200 SQM",label:"Public Courtyard"},{value:"14",label:"Stakeholder Groups Consulted"},{value:"96%",label:"Community Approval Rating"}];function PR(){return y.jsx("section",{className:"py-16 md:py-24 lg:py-32",style:{background:"var(--alrazah-parchment)"},children:y.jsx("div",{className:"mx-auto w-full max-w-[1440px] px-6 md:px-16",children:y.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 lg:gap-16 items-start",children:[y.jsxs("div",{children:[y.jsxs(Me,{children:[y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.08em] mb-4",style:{color:"var(--alrazah-gold)"},children:"Community Impact"}),y.jsx("h2",{className:"font-display text-[clamp(2.25rem,4vw,3.5rem)] leading-[1.1] tracking-[-0.015em] mb-5",style:{color:"var(--alrazah-deep-navy)",fontWeight:400},children:"Al Wukair Community Integration"}),y.jsx("p",{className:"text-base md:text-[18px] leading-[1.65] max-w-[54ch] mb-10",style:{color:"var(--alrazah-slate)"},children:"The Al Wukair Residential Complex was designed around a 3,200 sqm public courtyard accessible to residents and the broader Al Wakra community. The development includes a community health clinic, a prayer hall open to the public, and pedestrian linkages to the existing Al Wukair souq. Community consultation was conducted over 8 months with 14 community stakeholder groups."})]}),y.jsx(Me,{delay:.1,children:y.jsx("div",{className:"grid grid-cols-3 gap-6 mb-10",children:NR.map(n=>y.jsxs("div",{children:[y.jsx("p",{className:"font-mono text-xl md:text-2xl font-medium",style:{color:"var(--alrazah-deep-navy)"},children:n.value}),y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.04em] mt-1",style:{color:"var(--alrazah-stone)"},children:n.label})]},n.label))})}),y.jsx(Me,{delay:.16,children:y.jsxs("div",{className:"p-8",style:{borderLeft:"3px solid var(--alrazah-primary)",background:"var(--alrazah-primary-light)"},children:[y.jsx("p",{className:"font-display text-base md:text-[18px] italic leading-[1.65] max-w-[52ch]",style:{color:"var(--alrazah-deep-navy)",fontWeight:400},children:'"Alrazah Holding did not just build apartments. They built a connection to the neighbourhood. The public walkway and clinic have changed how our families access services."'}),y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.04em] mt-3",style:{color:"var(--alrazah-stone)"},children:"— Community Representative, Al Wukair Residents' Committee"})]})})]}),y.jsx(Me,{delay:.15,children:y.jsxs("div",{className:"space-y-4",children:[y.jsx("div",{className:"aspect-[4/3] overflow-hidden border",style:{borderColor:"rgba(10,22,40,0.08)"},children:y.jsx(Sr,{src:"https://media.base44.com/images/public/6a7b4d572a29fa810dbfbe5f/ad39674d0_generated_4cc8ba34.png",alt:"Al Wukair public courtyard in use by families",fittingType:"fill",className:"w-full h-full transition-transform duration-[600ms] hover:scale-[1.03]"})}),y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx("div",{className:"aspect-square overflow-hidden border",style:{borderColor:"rgba(10,22,40,0.08)"},children:y.jsx(Sr,{src:"https://media.base44.com/images/public/6a7b4d572a29fa810dbfbe5f/43c772dbb_generated_e83b0d90.png",alt:"Community consultation session",fittingType:"fill",className:"w-full h-full transition-transform duration-[600ms] hover:scale-[1.03]"})}),y.jsx("div",{className:"aspect-square overflow-hidden border",style:{borderColor:"rgba(10,22,40,0.08)"},children:y.jsx(Sr,{src:"https://media.base44.com/images/public/6a7b4d572a29fa810dbfbe5f/2a31e704c_generated_80b58900.png",alt:"Community health clinic entrance",fittingType:"fill",className:"w-full h-full transition-transform duration-[600ms] hover:scale-[1.03]"})})]}),y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.04em]",style:{color:"var(--alrazah-stone)"},children:"Al Wukair Residential Complex — Public courtyard and community health clinic."})]})})]})})})}const OR=["GRI 400-Series Aligned","WPS Compliant","QSE Disclosed","Independent Audits"];function AR(){return y.jsx("section",{className:"py-16 md:py-24 lg:py-32 text-center",style:{background:"var(--alrazah-primary)"},children:y.jsxs("div",{className:"mx-auto w-full max-w-[1440px] px-6 md:px-16",children:[y.jsxs(Me,{children:[y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.08em] mb-4",style:{color:"var(--alrazah-gold)"},children:"Stakeholder Engagement"}),y.jsx("h2",{className:"font-display text-[clamp(2.25rem,4vw,3.5rem)] leading-[1.1] tracking-[-0.015em] mb-5 max-w-[800px] mx-auto",style:{color:"var(--alrazah-parchment)",fontWeight:400},children:"Our Social Contract Is Open to Inspection"}),y.jsx("p",{className:"text-base md:text-[18px] leading-[1.65] max-w-[64ch] mx-auto mb-12",style:{color:"var(--alrazah-parchment)",opacity:.85},children:"Alrazah Holding welcomes social due diligence inquiries from institutional investors, labour inspectors, community representatives, and civil society organizations. Our ESG team provides workforce data packs, audit findings, and community feedback reports under confidentiality protocols where required."})]}),y.jsx(Me,{delay:.12,children:y.jsxs("div",{className:"flex flex-wrap justify-center gap-6 mb-16 md:mb-20",children:[y.jsx("button",{className:"h-14 px-10 font-mono text-[13px] uppercase tracking-[0.06em] font-semibold transition-all duration-300 hover:-translate-y-0.5",style:{background:"var(--alrazah-gold)",color:"var(--alrazah-deep-navy)"},onMouseEnter:n=>{n.currentTarget.style.boxShadow="0 8px 24px rgba(184,149,106,0.3)"},onMouseLeave:n=>{n.currentTarget.style.boxShadow="none"},children:"Request Social Due Diligence Pack"}),y.jsx("button",{className:"h-14 px-10 font-mono text-[13px] uppercase tracking-[0.06em] transition-all duration-300",style:{background:"transparent",border:"1px solid rgba(245,240,232,0.3)",color:"var(--alrazah-parchment)"},onMouseEnter:n=>{n.currentTarget.style.borderColor="var(--alrazah-parchment)",n.currentTarget.style.background="rgba(245,240,232,0.05)"},onMouseLeave:n=>{n.currentTarget.style.borderColor="rgba(245,240,232,0.3)",n.currentTarget.style.background="transparent"},children:"Contact ESG Officer"})]})}),y.jsx(Me,{delay:.2,children:y.jsx("div",{className:"flex flex-wrap justify-center gap-x-12 gap-y-4",children:OR.map(n=>y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.04em]",style:{color:"var(--alrazah-parchment)",opacity:.7},children:n},n))})})]})})}const LR=[{title:"Company",links:[{label:"About Alrazah",path:"/about"},{label:"Leadership",path:"/about"},{label:"Governance",path:"/about"},{label:"Careers",path:"/about"}]},{title:"Portfolio",links:[{label:"Real Estate",path:"/portfolio"},{label:"Logistics",path:"/portfolio"},{label:"Asset Management",path:"/portfolio"},{label:"Hospitality",path:"/portfolio"}]},{title:"Investors",links:[{label:"Annual Report 2025",path:"/investors"},{label:"ESG Disclosures",path:"/sustainability"},{label:"QSE Listing",path:"/investors"},{label:"Financial Calendar",path:"/investors"}]}];function jR(){return y.jsx("footer",{style:{background:"var(--alrazah-charcoal)"},children:y.jsxs("div",{className:"mx-auto w-full max-w-[1440px] px-6 md:px-16 py-16 md:py-20",children:[y.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-10 md:gap-8",children:[y.jsxs("div",{children:[y.jsxs("div",{className:"flex items-baseline gap-2 mb-4",children:[y.jsx("span",{className:"font-display text-2xl font-medium",style:{color:"var(--alrazah-parchment)"},children:"ALRAZAH"}),y.jsx("span",{className:"font-mono text-[10px] uppercase tracking-[0.2em]",style:{color:"var(--alrazah-stone)"},children:"HOLDING"})]}),y.jsx("p",{className:"text-sm leading-[1.6] max-w-[28ch]",style:{color:"var(--alrazah-stone)"},children:"Q.P.S.C. — Structuring capital around the welfare of the people and communities it serves."})]}),LR.map(n=>y.jsxs("div",{children:[y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.06em] mb-4",style:{color:"var(--alrazah-gold)"},children:n.title}),y.jsx("ul",{className:"space-y-2.5",children:n.links.map(t=>y.jsx("li",{children:y.jsx(Br,{to:t.path,className:"text-sm transition-colors duration-200",style:{color:"var(--alrazah-parchment)",opacity:.8},children:t.label})},t.label))})]},n.title))]}),y.jsxs("div",{className:"mt-14 pt-6 flex flex-col md:flex-row items-center justify-between gap-4",style:{borderTop:"1px solid rgba(245,240,232,0.08)"},children:[y.jsx("p",{className:"font-mono text-[12px] uppercase tracking-[0.04em]",style:{color:"var(--alrazah-stone)"},children:"© 2026 Alrazah Holding Q.P.S.C. All rights reserved."}),y.jsxs("div",{className:"flex items-center gap-6",children:[y.jsx(Br,{to:"/legal/privacy",className:"font-mono text-[12px] uppercase tracking-[0.04em]",style:{color:"var(--alrazah-stone)"},children:"Privacy"}),y.jsx(Br,{to:"/legal/terms",className:"font-mono text-[12px] uppercase tracking-[0.04em]",style:{color:"var(--alrazah-stone)"},children:"Terms"}),y.jsx("span",{className:"font-mono text-[12px] uppercase tracking-[0.06em] px-3 py-1.5",style:{border:"1px solid var(--alrazah-gold)",color:"var(--alrazah-gold)"},children:"QSE Listed"})]})]})]})})}function IR(){return y.jsxs("div",{style:{background:"var(--alrazah-parchment)"},children:[y.jsx(tR,{}),y.jsxs("main",{children:[y.jsx(fR,{}),y.jsx(pR,{}),y.jsx(yR,{}),y.jsx(wR,{}),y.jsx(bR,{}),y.jsx(kR,{}),y.jsx(TR,{}),y.jsx(PR,{}),y.jsx(AR,{})]}),y.jsx(jR,{})]})}const DR=()=>{const{isLoadingAuth:n,isLoadingPublicSettings:t,authError:s,navigateToLogin:o}=XC();if(t||n)return y.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:y.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(s){if(s.type==="user_not_registered")return y.jsx(YC,{});if(s.type==="auth_required")return o(),null}return y.jsxs(Wb,{children:[y.jsx(Lc,{path:"/sustainability/social",element:y.jsx(IR,{})}),y.jsx(Lc,{path:"*",element:y.jsx(KC,{})})]})};function MR(){return y.jsx(GC,{children:y.jsxs(DS,{client:GS,children:[y.jsxs(Xb,{children:[y.jsx(ZC,{}),y.jsx(DR,{})]}),y.jsx(cS,{})]})})}kw.createRoot(document.getElementById("root")).render(y.jsx(MR,{}));